Display an indicator of rankings with stars.
A default rating component with initializers and callbacks.
Pass the property type
to the Rating component.
Customize the amount of stars.
Customize the icons of a rating.
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 | - | - |
type RatingTypes =
| 'default'
| 'primary'
| 'secondary'
| 'success'
| 'warning'
| 'error'
| 'info'
type RatingCount = 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
type RatingValue = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
Previous
Radio
Next
Select