Welcome to the StepOne components documentation
StepOne Fundation
StepOne Modules
Rating
Rating component displays sort of numbers to rate something. It is used to display a rating value in a form.
Rating Props
| Name | Use | Type | Definition |
| amount | required | number | Specifies the amount of stars to display.. |
| onRate | required | (amount: number) => void | Callback 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 | string | Add 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.