Components · Interactive
Star rating input, supports controlled and read-only modes.
import { Rating } from '@nexub/react';| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| value | number | — | — | The controlled rating value. |
| max | number | 5 | — | Maximum number of stars. |
| readOnly | boolean | false | — | Prevents user interaction when true. |
| size | 'sm' | 'md' | 'lg' | — | — | Size of the star icons. |
| onValueChange | (value: number) => void | — | — | Callback fired when the user selects a new rating. |