Rating

A flexible and interactive star-based rating component for displaying or collecting user feedback.

lucide-react

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes.com/r/rating.json

Examples


Read only rating

Half star rating


API Reference

PropTypeDefault
valuenumberundefined
defaultValuenumber0
maxnumber5
onChange(value: number) => voidundefined
readOnlybooleanfalse
disabledbooleanfalse
allowHalfbooleanfalse
iconReact.ElementTypeStar
classNamestringundefined
sizenumber20