Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- 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
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
VVVinicius Vicentini
Tuestday morning at Mercado N.89
Rate your driver
Installation#
pnpm dlx shadcn@latest add @shark/rating
Usage#
import { RatingGroup } from "@/components/ui/rating";
<RatingGroup />
Controlled#
Use value and onValueChange to control the rating programmatically.
Select the rating 5
❌
States#
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.
| 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.