Rating
Forms

Rating.

Keyboard-operable ratings with unified Lucide stars.

Real interactive component
Live demo
4 / 5

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.

7 props
ParameterTypeRequiredDefaultPossible valuesDescription
valuenumberYes——Current selected rating.
onValueChange(value: number) => voidNo——Receives a selected star count.
maxnumberNo5—Maximum number of stars, clamped to 1–10.
labelstringNoRating—Accessible rating group name.
readOnlybooleanNofalsetrue · falseDisplay rating without interaction.
disabledbooleanNofalsetrue · falseDisable selection.
classNamestringNo——Additional CSS class on the outer component element.