Back to components

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-stars

Usage

Import
import { RatingStars } from "@/components/lumo/rating-stars"
Example
<RatingStars value={4.5} count={128} />

Props

PropTypeDefaultRequired
valuenumber-
Required
maxnumber5
countnumber-
size"sm" | "md""md"

All props accept standard HTML attributes unless otherwise specified.

Dependencies

npm packages

lucide-react

Own every line

Lumo blocks copy into your repo. No runtime dependency, no lock-in. Edit the code to fit your product.