ComponentsRating
Components
Rating
Star rating with an overlay clip for partial values, plus the numeric score and review count — used on product tiles and PDPs.
Configurator
4.4(1,881)
Usage
<Rating value={4.4} count={1881} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | — | Rating from 0–5; renders as a clipped star overlay. |
| count | number | — | Optional review count, shown in parentheses. |
| className | string | — | Additional classes, merged via tailwind-merge. |
Do's and Don'ts
Do
- ·Always pass a real, current value — never a hardcoded placeholder rating.
- ·Include count whenever review data exists; a bare score without volume reads as less trustworthy.
Don't
- ·Don't round value before passing it in — the component handles partial-star fill itself.
- ·Don't use Rating for anything that isn't a review score (e.g. a generic 1–5 slider) — build a dedicated control instead.