Star Rating
Small rating component: numeric value + gold star icons. Used in the testimonial cards and featured testimonial.
Sizes
5.0
sm (default)5.0
mdtsx
<StarRating />
<StarRating size="md" />Custom rating
4.0
3.0
tsx
<StarRating rating={4} />
<StarRating rating={3} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
rating | number | 5 | Numeric rating. Rendered as N filled gold stars plus the value label. |
size | "sm" | "md" | "sm" | `sm` = 14px stars, `md` = 16px stars. |
Import
tsx
import { StarRating } from '@/components/ui/StarRating'