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
Attribute | Description | Type | Accepted values | Default |
---|---|---|---|---|
type | rating type | RatingTypes | RatingTypes | default |
icon | custom icon | JSX.Element | - | - |
count | rating star count | number | RatingCount | 5 |
value | star values | number | RatingValue | - |
initialValue | initial star values | number | RatingValue | 1 |
onValueChange | value change event | (value?: any) => void | - | - |
locked | lock state | boolean | - | false |
onLockedChange | locked change event | (value?: any) => void | - | - |
... | native props | HTMLAttributes | - | - |
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
Contributors