Rating
Buttons
An accessible animated rating component with star icons, half-star support, custom icons, hover states, and spring animations.
Loading preview...
Customize
Size:
Value3
Max5
Allow Half
Read Only
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | 0 | Current rating value. |
onChange | (value: number) => void | undefined | Callback when the rating changes. |
max | number | 5 | Maximum rating value (number of stars). |
allowHalf | boolean | false | Whether to allow half-star ratings. |
readOnly | boolean | false | Makes the rating read-only. |
size | 'sm' | 'md' | 'lg' | 'md' | Size variant of the stars. |
icon | React.ReactNode | undefined | Custom icon to replace the default star. |
className | string | '' | Additional CSS classes. |