Loading preview
Coffee Order Dial
InputsA café dial for choosing a drink, with a cup that shows what goes into it.
A star rating built on native radio buttons, with a read-only display mode.
npx shadcn@latest add @venusui/ratingRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/rating.tsxThe code behind the preview above.
rating-demo.tsx
import { Rating } from "@/components/ui/rating"
export default function RatingDemo() {
return (
<div className="flex flex-col items-center gap-4">
<Rating label="Rate this template" defaultValue={4} />
<Rating label="Average rating" value={3} readOnly />
</div>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | — | Accessible name, e.g. “Rate this template”. Required. |
| value | number | — | Controlled value. |
| defaultValue | number | 0 | Initial value. |
| onValueChange | (value: number) => void | — | Called when the rating changes. |
| max | number | 5 | Number of stars. |
| readOnly | boolean | false | Display only. |
Only the props above, plus className.
lucide-react, React 19 and Tailwind CSS v4.fill-amber-400 in the file.name to both.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A café dial for choosing a drink, with a cup that shows what goes into it.
A wall plate of rocker switches that light a row of pendant bulbs.
A graphic equalizer panel with faders, LED columns, a response curve and presets.