Primitives
Rating Stars
An accessible rating display. Exposes the score through an aria-label and renders a partial star for fractional values.
accessible
rating
compact
Preview
Installation
Run the shadcn CLI. Dependencies and the shared lib block come with it.
npx shadcn add rating-starsUsage
Import
import { RatingStars } from "@/components/lumo/rating-stars"Example
<RatingStars value={4.5} count={128} />Props
| Prop | Type | Default | Required |
|---|---|---|---|
| value | number | - | Required |
| max | number | 5 | |
| count | number | - | |
| size | "sm" | "md" | "md" |
All props accept standard HTML attributes unless otherwise specified.
Dependencies
npm packages
lucide-reactOwn every line
Lumo blocks copy into your repo. No runtime dependency, no lock-in. Edit the code to fit your product.