Components
- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
VVVinicius Vicentini
Tuestday morning at Mercado N.89
Rate your driver
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/rating.json
Usage
import { RatingGroup } from "@/components/ui/rating";
<RatingGroup />
Controlled
Use value and onValueChange to control the rating programmatically.
Select the rating 5
❌
State
Readonly
Use the readOnly prop to display a rating without interaction.
Disabled
Use the disabled prop to prevent interaction and show a disabled state.
Examples
Half star
Use allowHalf to allow half-star selections.
Count
Use the count prop to show more or less stars.
Testimonial
Display a read-only rating inside a testimonial card.
“This completely changed our workflow. Fast, reliable, and the team loves it. Would recommend to anyone.”
VVVinicius Vicentini
Frontend Developer
Customize size
Use the className prop to set the size of the rating.
Custom icon
Compose the rating with a different icon.
Custom color
Override the filled color with className.
API Reference
Rating
Root component. Forwards props to Ark UI's RatingGroup.Root. Manages value and hover.
| Prop | Type | Default |
|---|---|---|
allowHalf | boolean | false |
count | number | 5 |
defaultValue | number | - |
value | number | - |
onValueChange | (details: ValueChangeDetails) => void | - |
readOnly | boolean | - |
disabled | boolean | - |
className | string | - |
For a complete list of props, see the Ark UI documentation.