The rating component lets users apply a rating to an item or experience, such as an image, a forum post, an item for sale in a marketplace, and more.
By default, ratings are not emphasized (gray). This version is optimal for when the rating is not the core part of an interface, such as in application panels, where all visual components are monochrome in order to direct focus to the content.
The emphasized (blue) version provides a visual prominence that is optimal for forms, dialogs, and other situations where a rating needs to be noticed.
A rating in a disabled state shows that the component exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that an action may become available later.
From the design point of view, each component has a number of options. These options and their names are platform agnostic, and each implementation should adapt these to fit into their framework.
yes / no
yes / no
When interacting with a rating component that has a previously entered value, an underline appears under the current selection to provide context.
The rating can be cleared by clicking/tapping one more time on the “highest” star (e.g., the third star for a three-star rating). On keyboard focus, users can use the left/down arrow keys to decrease the rating until the last one is removed.
When representing multiple values (e.g., rating 2 photos at the same time), the rating is shown as empty if the ratings are not the same. This behavior is consistent with how a radio button group works, as well.
In Windows high contrast mode, rating should be displayed using the high contrast theme-specified colors for buttons. By default, deselected star border and fill colors should be the same as the button text color. The selected star fill color for the emphasized option should be the same as button border color. In hover and keyboard focus states, the border colors should display as the button border color. In the disabled state, border and text color should display as the disabled color.
Star ratings should always have 5 available stars. This shouldn’t be increased or decreased to fit various containers.
|Tab||Places focus on the rating component. If focus is already on the rating component, the focus is moved to the next item in the page sequence.|
|Right/Up Arrows||Increases the rating by one, up to 5.|
|Left/Down Arrows||Decreases the rating by one. If only 1 star remains, clears the rating completely.|
|Jul 31, 2019||2.0.0|
|Apr 20, 2019||1.0.0|
Includes all interactive states that are applicable (hover, down, focus, keyboard focus, disabled).
Includes relevant options (variant, style, size, orientation, optional iconography, decorations, selection, error state, etc.)
Works properly across all four color themes (lightest, light, dark, darkest).
Includes a desktop scale (UWP, macOS, web desktop) and a mobile scale (iOS, Android, web mobile).
Includes guidelines for layout (wrapping, truncation, overflow), animation, interactions, etc.
Includes a list of dos and don’ts that highlight best practices and common mistakes.
Follows WCAG 2.0 standards for contrast (AA).
Works properly across various locales and includes guidelines for bi-directionality (RTL).
Follows WCAG 2.0 standards for keyboard accessibility guidelines and includes a description of the keyboard interactions.
All design attributes (color, typography, layout, animation, etc.) are included in Spectrum DNA.
Includes a downloadable XD file that has been generated by code and shows multiple variations, states, color themes, and scales.
Component is included in the Spectrum for Adobe XD plugin.