mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-23 01:45:05 +08:00
882cec62d6
* docs: Add components overview page * fix detail * remove ContributorsList form overview page * fix components url * improve code style * remove extra file * fix detail * fix lint * fix lint * docs: Finish components overview page * fix lint * docs: Update cover * fix lint * update cover * update menu * improve overview page * refactor code * fix order * update title * add components count * fix overview page ssr bug * move less file * update title margin Co-authored-by: arvinxx <arvinx@foxmail.com>
1.4 KiB
1.4 KiB
category | type | title | cover |
---|---|---|---|
Components | Data Entry | Rate | https://gw.alipayobjects.com/zos/alicdn/V-ycROUpN/Rate.svg |
Rate component.
When To Use
- Show evaluation.
- A quick rating operation on something.
API
Property | Description | type | Default |
---|---|---|---|
allowClear | whether to allow clear when click again | boolean | true |
allowHalf | whether to allow semi selection | boolean | false |
autoFocus | get focus when component mounted | boolean | false |
character | custom character of rate | ReactNode | <StarFilled /> |
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 | CSSProperties | |
tooltips | Customize tooltip by each character | string[] | |
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 |
---|---|
blur() | remove focus |
focus() | get focus |