Rating
A 0-5 rating input, or a read only display of any number, even with decimals, between 0 and 5.
Examples
Interactive Rating
<Rating
size="small|medium(default)"
defaultValue={2}
/>
Read Only Rating
<Rating
...
readOnly
value={3.5}
/>
Controlled Interactive Rating
<ExampleRating
...
value={someValue}
onChange={handleChange}
/>
Props
| Name | Type | Default Value | Required | Description |
|---|---|---|---|---|
defaultValue | string | number | No | The default value of the rating. | |
onChange | FormControlChangeEventHandler<InputType, string | number | readonly string[] | (string | number | readonly string[])[]> | undefined | No | Emit a new value when the input's selected value changes. | |
size | "small" | FormControlSize | "medium" | FormControlSize.Medium | No | The size of the field. |
value | string | number | No | The current value of the rating. |