DocumentationDownloads and examples

Rating

Rating component displays sort of numbers to rate something. It is used to display a rating value in a form.

Rating Props

NameUseTypeDefinition
amount
required
numberSpecifies the amount of stars to display..
onRate
required
(amount: number) => voidCallback function prop that will be called when a star is clicked. The function receives the amount of stars as a parameter.
label
optional
{ left: string; right: string }Used to display a label for the rating.
className
optional
stringAdd additional CSS classes to the component..

Examples

Default amount Rating
Example of a rating with default amount.
Alternative amount Rating
Example of a rating with alternative amount.
Rating with label
Example of a rating with label by adding label prop.
0 - Not likelyVery likely - 10