Rating

Rating is a useful component to judge content, or display content quality.

Overview

With Rating the user can rate content with a 1 to 5 star scale. A readOnly property can be applied for instances where the user is unable to add a score, but can view an aggregate of past ratings.

Usage

  • Display the overall user-rated quality of content
  • Vote on the quality of content

Sample

Accessibility

Rating should be accompanied by a Label, which provides context of the intent to support assistive technologies.

Keyboard navigation

KeyFunction
Arrow leftMoves focus and selection to the previous item. If the current focus and selection is on the first item, focus and selection will cycle to the last item.
Arrow rightMoves focus and selection to the next item. If the current focus and selection is on the last item, focus and selection will cycle to the first item.
Arrow downMoves focus and selection to the next item.
Arrow upMoves focus and selection to the previous item.
EnterSelects or unselects the focused item.
TabMoves focus in and out of the component.
Tab and ShiftMoves focus in and out of the component.

API reference

Properties

Styles

Events

Methods

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.