1. components
  2. ratings
  3. react

Rating

A visual representation of a numeric range.

Using Icons

Interactive

Steps

Use the step property to define a fractional granularity.

Right-to-Left

API Reference

Rating

Property Type Description
value
number
Sets the rating value.
max
number
Sets the maximum rating value.
interactive
boolean
Sets interactive mode.
step
number
Sets the rating fractional granularity.
base
string
Sets base styles.
width
string
Sets width styles.
justify
string
Sets justification styles.
spaceX
string
Sets horizontal spacing styles.
classes
string
Provide arbitrary CSS classes.
buttonBase
string
Sets the button base styles.
buttonPosition
string
Sets the button position styles.
buttonAspect
string
Sets the button aspect ratio styles.
buttonClasses
string
Provide arbitrary CSS classes to the rating button.
emptyBase
string
Set base styles for the empty icon.
emptyClip
string
Set the clip styles for the empty icon.
emptyInteractive
string
Set interactive state styles for the empty icon.
emptyStatic
string
Set non-interactive state styles for the empty icon.
emptyClasses
string
Provide arbitrary CSS classes for the empty icon.
fullBase
string
Set base styles for the full icon.
fullClip
string
Set the clip styles for the full icon.
fullInteractive
string
Set interactive state styles for the full icon.
fullStatic
string
Set non-interactive state styles for the full icon.
fullClasses
string
Provide arbitrary CSS classes for the full icon.
onMouseDown
object
Triggers on rating mouse down.
onKeyDown
object
Triggers on rating key down.
onValueChange
object
Triggers on rating value change.
iconEmpty
React.ReactNode
The empty icon children.
iconFull
React.ReactNode
The full icon children.