Rating
Pick and display rating
Source
LLM docs
Docs
PackageIcon
Usage
Color
Size
Count
Controlled
Uncontrolled
Rating can be used with uncontrolled forms the same way as a native input element.
Set the name attribute to include rating value in FormData object on form submission.
To control the initial value in uncontrolled forms, use the defaultValue prop.
Example usage of uncontrolled Rating with FormData:
Read only
Allow clear
Set allowClear prop to allow users to reset the rating to 0 by clicking the same rating value again.
This is useful when you want to give users the ability to undo their rating selection:
Click the same star to clear the rating
Current rating:
3
Fractions
Fractions: 2
Fractions: 3
Fractions: 4