Component
Rating
A row of stars that fill on hover and click, with optional half-star precision, read-only or interactive.
The primitive
rating.tsx
<NativeRating value={value} onValueChange={setValue} />Example
A read-only rating summarizing feedback left after a completed transaction, no interactivity since the score is already final.
How was this transaction?
rating-example.tsx
<NativeRating value={5} readOnly />Capabilities
| Prop | Type | Description |
|---|---|---|
| valuerequired | number | — |
| onValueChange | (value: number) => void | — |
| max | number | — |
| size | number | — |
| readOnly | boolean | — |
| allowHalf | boolean | — |
| className | string | — |