Components
Loading preview...
An interactive star rating component with configurable scale, sizes (sm/md/lg), and readonly mode. Users can click stars to set ratings with smooth hover animations and visual feedback.
@molecule-ui
npx shadcn@latest add https://21st.dev/r/molecule-lab-rushil/star-ratingimport React from 'react'
import { StarRating } from "@/components/ui/star-rating";
export default function DemoOne() {
const [rating, setRating] = React.useState(3)
return <StarRating ratingScale={5} value={rating} onRatingChange={(rating) => setRating(rating)} />;
}