Rating

zyra-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.

PropTypeDefaultDescription
valuenumber0Current rating value
maxnumber5Number of stars to render
size'sm' | 'md' | 'lg''md'Physical size of the stars
readonlybooleanfalseDisables interaction, for display only
disabledbooleanfalseDisables 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