Rating
Star rating on Base UI RadioGroup with hover preview and three sizes. Without a change handler, or when read-only, it renders as a labelled image of whole stars; star labels are translatable.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
Installation
pnpm dlx shadcn add @01orbital/ratingnpx shadcn add @01orbital/ratingyarn shadcn add @01orbital/ratingbunx --bun shadcn add @01orbital/ratingPart of the 01orbital library. With a license, put ORBITAL_TOKEN in .env.local and the same command installs it (licensed install, pricing).
It lands at components/forms/rating.tsx, as source you own and edit.
Usage
"use client"
import { useState } from "react"
import { Rating } from "@/components/forms/rating"
// Every word on the page. Change copy here, not in the markup.
const COPY = {
yours: "Your rating",
average: "Average rating",
} as const
// Interactive with value and onValueChange; a display without them.
export default function RatingDemo() {
const [value, setValue] = useState(3)
return (
<div className="grid justify-items-center gap-6 text-sm text-muted-foreground">
<div className="grid justify-items-center gap-1">
<span>{COPY.yours}</span>
<Rating
label={COPY.yours}
value={value}
onValueChange={setValue}
size="lg"
/>
</div>
<div className="grid justify-items-center gap-1">
<span>{COPY.average}</span>
<Rating label={COPY.average} value={4} />
</div>
</div>
)
}API reference
Prop
Type
It also accepts the HTML attributes of the element it renders.
Dependencies
npm: @base-ui/react, @phosphor-icons/react, class-variance-authority, cn. The CLI installs them for you.
No other registry pieces.
More App
Metric Card
Compact KPI card: a metric name, a large tabular value, an optional outline badge with a trend-up or trend-down icon and screen-reader label, and an optional description line.
Avatar
Round avatar on Base UI with image, fallback initials and a corner status badge, in small, default and large sizes. AvatarGroup overlaps faces with a ring and adds a remaining-count circle.