Components › Forms
Rating
Stars as a radio group with hover preview, arrow keys and a read-only mode.
Installation
npx plankui@latest add ratingUsage
import { Rating } from "@/components/ui/rating";
<Rating value={stars} onValueChange={setStars} />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value / onValueChange | number / (n) => void | 0 | Stars chosen. |
| max | number | 5 | Number of stars. |
| readOnly | boolean | false | Display only. |
| size | "sm" | "md" | "lg" | "md" | Star size. |