Components/Rating Indicator

fd-rating-indicator · 7 examples from SAP's documentation · Back to the gallery

About

The rating indicator displays a group of icons or images (usually stars) that indicate a rating. It allows users to rate content on a numeric scale, typically from 1 (lowest) to 5 (highest). Although the maximum amount is 7 for the icons or images, it is highly recommended to display the default amount of 5.

Use the rating indicator in forms, tables, or in a dialog box. Use the rating indicator in forms, tables, or in a dialog box.

Sizes

| **Size** | **rem** | **Modifier class** | | :---------- | :--------- | -----------------------: | | Extra small | 0.75rem | \

Default (Medium):
(2 of 5)
Extra small:
(2 of 5)
Small:
(2 of 5)
Large:
(2 of 5)
Cozy:
(2 of 5)
Compact:
(2 of 5)
Condensed:
(2 of 5)

Custom icons

To make the rating indicator to use custom icons needs to be added class \

(2 of 5)

Half values

To display half values with the rating indicator i.e 2.5 stars, add the \

Default:
(2.5 of 5)
Custome icons:
(2.5 of 5)
Custome icons and size --lg:
(2.5 of 5)

Disabled

To disable rating indicator, the \

Default:

(2 of 5)

Default:

(2 of 5)

Display mode

Data can be presented as label-value field pairs without editable fields in display-only forms, see Form Grid for more details. If you want to include a rating indicator in a display-only form, add the \

Default:

(2 of 5)

Half values:

(2.5 of 5)

Non-interactive

If you want to include a rating indicator in a display-only form, add the \

Default:

(2 of 5)

Half values:

(2.5 of 5)

Different values

It is possible to display the rating indicator with a different number of values. It is highly recommended to use 5 as the maximum value, however you can go up to 7 if it is ideal for your use case.

(2 of 5)
(2 of 6)
(2 of 7)