Rate

Documentation and examples for the Rate component.

When To Use

  • Show evaluation.
  • A quick rating operation on something.

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

Property
Description
Type
Default

value

Current value of the rating number 0

max

Maximum rating value number 5

readonly

If true, the rating cannot be modified boolean false

name

Name attribute for the hidden input string 'rating'

icon

Icon to use for the rating IconName 'Star'

color

Color variant of the rating stars 'default' | 'yellow' | 'orange' | 'red' | 'green' | 'blue' | 'purple' 'default'

allowHalf

Whether to allow half-star ratings boolean false

size

Size of the rating icons '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