Rating

The product rating is visually represented with a star rating.


Recommendations#

  • The maximum number of 5 stars can be reached.
  • If the product has not yet been rated, no stars will appear.
  • The number in the bracket indicates how many users have already submitted a rating.

Elements#

The rating component consists of:

rating-element

  1. Stars
  2. Rating number

Overall styling#

  • The text style is basic.
  • The line-height is set to default.
  • The icon star-fill or star-percentage is used.
TypesStateAttributesPreview
stardefaultbackground-color: gray-lightrating-default
starhover-focusbackground-color: gray-lighterrating-default
star-selecteddefaultbackground-color: mark-darkerrating-selected
star-selectedhover-focusbackground-color: mark-darkrating-hover-focus
component with starsdefaultstar background-color: gray-light
rating number color: brand-primary-base
rating default
component with starshover-focusstar background-color: gray-lighter
rating number color: brand-primary-darker
rating hover-focus
component with stars-selecteddefaultstar background-color: gray-light
star-selected background-color: mark-darker
rating number color: brand-primary-base
rating default
component with stars-selectedhover-focusstar background-color: gray-lighter
star-selected background-color: mark-dark
rating number color brand-primary-darker
rating hover-focus

Spacing & measurements#

  • The height of the rating is 16px.
  • The width depends on the number of given ratings in the bracket.
  • The rating component changes between LG and MD-XS breakpoint. The star icons remain the same size and only the rating number text style changes according to the basic text style.
TypesAttributesPreview
Icon-size16pxicon-size
Padding4pxpadding

Behavior#

The inside of the last star item can be filled from left to right based on percentages. A rating can be interactive (e.g. on product detail page) or static (e.g. on product tile). If the rating is static the rating component has no hover-focus state.


Variants#

RatingPreview
5 starsstar 5
4 starsstar 4
3 starsstar 3
2 starsstar 2
1 starsstar 1
No starsNot yet rated - no stars are shown.

Examples#

This is a non-obligatory example of the positioning of the star rating on the product tile.

position


What can be modified?#

  • Override the text and select the status of the stars.

Our workflow in Sketch#

  • Use the "Overrides"-function to change the number of stars.

References#

[T16 | Global] Rating Stars

Change log#

Fixed#

  • Doc: "Rating" | Jumpmark to what can be modified

Highlights#

  • Sketch, Doc: "Rating" | Component is available with the latest color definitions