Rating
View in FigmaA star rating input with half-star support, hover preview, and read-only mode.
FormsImport
import { Rating } from "@/components/ui"API
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | — | Current rating value. |
| onChange | (value: number) => void | — | Callback when rating changes. |
| max | number | 5 | Maximum number of stars. |
| size | "sm" | "md" | "lg" | "md" | Star size. |
| readOnly | boolean | false | Prevent user interaction. |
| allowHalf | boolean | false | Allow half-star increments. |