RUI.next

Data-Entry
Rate

Rate

Rate screen, generally used to do some rating by user.

<Rate />
<Rate />

Example

Basic usage of Rate component.

Basic Rate with Callback function (`RUI-log` in Console log)
Readonly mode
Allow half-star
Customized character and styles
R
R
R
R
R


API

PropertiesDescriptionTypeDefault
allowClearWhether allow to clear once click againbooleantrue
allowHalfWhether allow to show half starbooleanfalse
characterCustomized characterReactNode<Icon type="star" />
countThe total count of star(s)number5
defaultValueThe default valuenumber0
readonlyThe readonly modebooleanfalse
valueThe current valuenumber-
onChangeThe callback function when the star is selected(value: number) => void-
activeColorThe active colorstring#FFD21E
sizeThe size of rate itemnumber24