logo

Rate

Examples

The simplest usage.

expand code expand code

Add copywriting in rate components.

expand code expand code

Support set allow to clear star when click again.

expand code expand code

Support select half star.

expand code expand code

Read only, can't use mouse to interact.

expand code expand code

Replace the default star to other character like alphabet, digit, iconfont or even Chinese word.

expand code expand code

Rate API#

Property Description Type Default Value
AllowClear ParameterWhether to allow clear or not when clicking again Boolean true
AllowHalf ParameterWhether to allow selection of halves Boolean false
Disabled ParameterWhether to disable the selection or not Boolean false
AutoFocus ParameterWhether to focus on render or not Boolean true
Character ParameterCustom character for each rate RenderFragment<RateItemRenderContext> --
Count ParameterNumber of icons to display for rating Int32 5
Value ParameterCurrent value for rating Decimal --
ValueChanged ParameterCallback executed when the rating changes EventCallback<Decimal> --
DefaultValue ParameterDefault value for when rating is rendered Decimal --
Tooltips ParameterTooltip to show for each increment of rating, in order of index of rating 0-n String[] --
OnBlur ParameterCallback executed when the rate looses focus EventCallback<FocusEventArgs> --
OnFocus ParameterCallback executed when the rate gains focus EventCallback<FocusEventArgs> --
Id ParameterID for the component's HTML String Uniquely Generated ID
Class ParameterSpecifies one or more class names for an DOM element. String --
Style ParameterSpecifies an inline style for a DOM element. String --
RefBack ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current. ForwardRef --
Radio Select
文档已更新,请点击 此处 更新。
A new version of this app is available. Click here to update.