Rating
A star-rating input for reviews and feedback forms, with hover preview and keyboard support.
API
All inputs and configuration options for zyra-rating.
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | 0 | Current rating value |
max | number | 5 | Number of stars to render |
size | 'sm' | 'md' | 'lg' | 'md' | Physical size of the stars |
readonly | boolean | false | Disables interaction, for display only |
disabled | boolean | false | Disables interaction and dims the control |
Accessibility
Built to meet WCAG 2.0 AA. These notes cover the key ARIA, keyboard, and interaction behaviours.
- Container uses role="radiogroup"; each star is role="radio" with aria-checked
- Arrow Left/Down and Right/Up adjust the value by one star