docs/components/rating
Sections
Components
Utilities
Forms
Hooks
Copy Markdown
Show reviews and ratings in a visual format.
PreviewCode
VV
Vinicius Vicentini
Tuestday morning at Mercado N.89
Rate your driver
Submit
CLIManual
pnpmbunnpmyarn
pnpm dlx shadcn@latest add @shark/rating
import { RatingGroup } from "@/components/ui/rating";
<RatingGroup />
Use value and onValueChange to control the rating programmatically.
PreviewCode
Select the rating 5
❌
Use the readOnly prop to display a rating without interaction.
PreviewCode
Use the disabled prop to prevent interaction and show a disabled state.
PreviewCode
Use allowHalf to allow half-star selections.
PreviewCode
Use the count prop to show more or less stars.
PreviewCode
Display a read-only rating inside a testimonial card.
PreviewCode
“This completely changed our workflow. Fast, reliable, and the team loves it. Would recommend to anyone.”
VV
Vinicius Vicentini
Frontend Developer
Use the className prop to set the size of the rating.
PreviewCode
Compose the rating with a different icon.
PreviewCode
Override the filled color with className.
PreviewCode
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.
[
Previous page
Radio Group ](/docs/components/radio-group)[
Next page
Resizable ](/docs/components/resizable)
On This Page
InstallationUsageControlledStatesReadonlyDisabledExamplesHalf starCountTestimonialCustomize sizeCustom iconCustom colorAPI ReferenceRating