Rating

Display an indicator of rankings with stars.

Default

A default rating component with initializers and callbacks.

Types

Pass the property type to the Rating component.

Custom Amount

Customize the amount of stars.

Icon

Customize the icons of a rating.

APIs

Rating.Props

AttributeDescriptionTypeAccepted valuesDefault
typerating typeRatingTypesRatingTypesdefault
iconcustom iconJSX.Element--
countrating star countnumberRatingCount5
valuestar valuesnumberRatingValue-
initialValueinitial star valuesnumberRatingValue1
onValueChangevalue change event(value?: any) => void--
lockedlock stateboolean-false
onLockedChangelocked change event(value?: any) => void--
...native propsHTMLAttributes--

RatingTypes

type RatingTypes = 'default' | 'secondary' | 'success' | 'warning' | 'error'

RatingCount

type RatingCount = 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10

RatingValue

type RatingValue = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10