Forms
Rating
A row of stars for giving or showing a score. Configurable maximum and size, with a read-only mode.
Group: Forms. Exports: Rating. Halaska addition with no shadcn/ui equivalent.
Usage
import { Rating } from "./halaska-kit";
Rating props
valuenumber(default 0): The controlled value.onChange(value) => void: Called with the new value.maxnumber(default 5):sizenumber(default 18): Size of the control.readOnlyboolean:
Accessibility
- The row is a group labelled with the current score, for example Rating, 3 of 5.
- Each star is a native button labelled with its value. The star that matches the score sets aria-pressed.
- Arrow keys do not change the value. The hover preview is mouse only.
- In read-only mode the buttons are disabled and leave the tab order.
Halaska UI · Components · Patterns · Screens · Install