On this page
Overview
Show code, ReviewScore.tsx
Variants
- Stars only
A list of individual reviews.
- With the number
A summary people compare.
- Another scale
Other than five steps, such as ten.
Stars only, with the number, and on a scale of ten stars.
Show code, Scales.tsx
Anatomy
Number
Stars
Filled star
Half star
Empty star
Show code, RatingAnatomy.tsx
Behaviour
Rounding
The stars, the number and the name show the value to the nearest half star: 4.3 shows as 4.5. A value outside the scale shows as its nearest end.
In another language
The name and the number follow the application's language, such as 4,5 in German.
Show code, ApplicationLabel.tsx
Rules
A rating only shows a score people gave; to ask for one, use a separate input.
Use it when
- A rating people gave, such as a review score or an average of many
- A compact summary of quality beside a name in a list, a card or a row
Show code, WhoRated.tsx
One scale
Keep to one scale on a page, so ratings compare at a glance.