Rating
FREEStar rating with halves, hover preview, labels, keyboard support and a read-only mode.
Installation
Terminal
npx @bloxa/cli add rating
# or: npx shadcn@latest add @bloxa/ratingPackages installed automatically: motion
Examples
Labels, halves, custom icon, read-only
Good
API reference
Every component also accepts the props of the element it renders.
Rating
| Prop | Type | Default | Description |
|---|---|---|---|
| value / onValueChange | number / (value) => void | — | Score. |
| max | number | 5 | Maximum. |
| allowHalf | boolean | false | Half steps. |
| readOnly / disabled | boolean | — | Read-only / disabled. |
| labels | string[] | — | Text per score. |
| icon / color | ReactNode / string | star / #f59e0b | Shape and color. |
| size | "sm" | "md" | "lg" | "md" | Size. |