Rate

Documentation and examples for the Rate component.

いつ使うか

  • 評価を表示します。
  • 何かに対する素早い評価操作。

Example Usage

Half-Stars

Enable half-star precision with the allowHalf prop.

Colors and Icons

Customize the appearance with color and icon props.

Sizes

API

プロパティ
説明
タイプ
デフォルト

value

評価の現在の値 number 0

max

最大評価値 number 5

readonly

trueの場合、評価は変更できません boolean false

name

隠し入力の名前属性 string 'rating'

icon

評価に使用するアイコン IconName 'Star'

color

評価星のカラーバリアント 'default' | 'yellow' | 'orange' | 'red' | 'green' | 'blue' | 'purple' 'default'

allowHalf

半星評価を許可するかどうか boolean false

size

評価アイコンのサイズ 'sm' | 'md' | 'lg' 'md'

error

Indicates an error state or displays an error message string | boolean

success

Indicates a success state or displays a success message string | boolean

disabled

Disables the component boolean false