Rating.
Keyboard-operable ratings with unified Lucide stars.
The preview uses the actual shared component, including your current theme, rounding, border and motion preferences.
Props & API reference
Parameters available in the shared component, including value types, requirements and accepted options.
| Parameter | Type | Required | Default | Possible values | Description |
|---|---|---|---|---|---|
value | number | Yes | — | — | Current selected rating. |
onValueChange | (value: number) => void | No | — | — | Receives a selected star count. |
max | number | No | 5 | — | Maximum number of stars, clamped to 1–10. |
label | string | No | Rating | — | Accessible rating group name. |
readOnly | boolean | No | false | true · false | Display rating without interaction. |
disabled | boolean | No | false | true · false | Disable selection. |
className | string | No | — | — | Additional CSS class on the outer component element. |