Rating Component
Interactive Ratings
Your rating: 3
3.0/5
Your rating: 4.5
4.5/5
Your rating: 0
0.0/10
Readonly Ratings
Product Rating:
4.2/5
Service Rating:
3.7/5
Overall Rating (out of 10):
8.3/10
Different Sizes
Small:
3.0/5
Medium:
4.0/5
Large:
5.0/5
Usage Examples
Basic Rating
import { Rating } from "@/components/rating";
<Rating value={4} onChange={setValue} />Readonly Rating
<Rating value={4.2} readonly />Rating with Custom Max Value
<Rating value={7} max={10} onChange={setValue} />Rating with Different Sizes
<Rating value={3} size="sm" onChange={setValue} />
<Rating value={4} size="md" onChange={setValue} />
<Rating value={5} size="lg" onChange={setValue} />