Rate
Used for rating operation on something.
When to use
- Show evaluation.
- A quick rating operation on something.
Examples
API
Rate are exported from @ceebee/ui/client.
Rate
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
allowClear | Whether to allow clear when click again | boolean | true | — |
allowHalf | Whether to allow semi selection | boolean | false | — |
character | The custom character of rate | ReactNode | (RateProps) => ReactNode | <StarFilled /> | function(): 4.4.0 |
count | Star count | number | 5 | — |
defaultValue | The default value | number | 0 | — |
disabled | If read only, unable to interact | boolean | false | — |
keyboard | Support keyboard operation | boolean | true | 5.18.0 |
size | Star size | 'small' | 'medium' | 'large' | 'medium' | — |
tooltips | Customize tooltip by each character | TooltipProps[] | string\[] | - | — |
value | The current value | number | - | — |
onBlur | Callback when component lose focus | function() | - | — |
onChange | Callback when select value | function(value: number) | - | — |
onFocus | Callback when component get focus | function() | - | — |
onHoverChange | Callback when hover item | function(value: number) | - | — |
onKeyDown | Callback when keydown on component | function(event) | - | — |
blur() | Remove focus | — | — | — |
focus() | Get focus | — | — | — |