@fluixi-ui/rating
v0.1.0-alpha.10
Published
Headless star rating for the Fluixi UI ecosystem
Readme
@fluixi-ui/rating
Headless star rating for the Fluixi UI ecosystem.
Exposes role="slider" so half-steps and keyboard both work cleanly: hover to
preview, click to commit, arrows to nudge, Home/End to jump. Controlled via
value/onChange or uncontrolled via defaultValue.
import { Rating } from '@fluixi-ui/rating';
<Rating defaultValue={3} />
<Rating value={score()} onChange={setScore} allowHalf />
<Rating value={4} readOnly />Style via [data-rating] / [data-rating-item] (data-state = full / half
/ empty), or override the tokens --flx-ui-rating-size, --flx-ui-rating-gap,
--flx-ui-rating-color, and --flx-ui-star (the star mask).
