mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
fb0b4f0fc9
* docs: add api first appearance * docs: fix auto-complete doc * docs: replace Version Added with Version * docs: date picker common method * docs: date picker common method * docs: tree * docs: remove meaningless 3.0.0
1.4 KiB
1.4 KiB
category | type | title |
---|---|---|
Components | Data Entry | Rate |
Rate component.
When To Use
- Show evaluation.
- A quick rating operation on something.
API
Property | Description | type | Default | Version |
---|---|---|---|---|
allowClear | whether to allow clear when click again | boolean | true | 3.1.0 |
allowHalf | whether to allow semi selection | boolean | false | |
autoFocus | get focus when component mounted | boolean | false | |
character | custom character of rate | ReactNode | <Icon type="star" /> |
|
className | custom class name of rate | string | - | |
count | star count | number | 5 | |
defaultValue | default value | number | 0 | |
disabled | read only, unable to interact | boolean | false | |
style | custom style object of rate | object | - | |
tooltips | Customize tooltip by each character | string[] | - | 3.12.0 |
value | 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) | - |
Methods
Name | Description | Version |
---|---|---|
blur() | remove focus | |
focus() | get focus |