easeUI

Rating

A row of stars that previews the score on hover, fills up to the pick in a quick wave, and moves one star at a time with the arrow keys.

Rate this component

Tap a star

Installation

$ bunx --bun shadcn add @easeui/rating

API reference

PropTypeDefaultDescription
value?number-Controlled value, from 0 to `max`.
defaultValue?number0Starting value when uncontrolled. Default 0.
onValueChange?((value: number) => void)-Called with the new value each time a star is picked.
max?number5How many stars. Default 5.
readOnly?booleanfalseShows the value without letting anyone change it. Default false.
size?"sm" | "md" | "lg"mdDefault "md".
label?stringRatingNames the group for screen readers. Default "Rating".
className?string--