Rating
Interactive star rating with hover preview. Works controlled or uncontrolled, and can be read-only.
Import
import { Rating } from "@igorao79/uivix";Examples
Controlled
Value managed by state
3 / 5
Read only
Display a score
Custom max
10 stars
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | - | Controlled value |
| defaultValue | number | 0 | Initial value when uncontrolled |
| max | number | 5 | Number of stars |
| onChange | (value: number) => void | - | Called when a star is selected |
| readOnly | boolean | false | Disable interaction |
| size | number | 24 | Star size in px |
| className | string | - | Additional CSS classes |