Rating
Ratings provide insight regarding others' opinions and experiences, and can allow the user to submit a rating of their own.
Basic
<me-rating value="3"></me-rating>
Read-only
<me-rating value="3.5" read-only></me-rating>
Half Precision
<me-rating value="2.5" precision="0.5"></me-rating>
Sizes
<me-rating value="3" size="small" read-only></me-rating>
<me-rating value="3" read-only></me-rating>
<me-rating value="3" size="large" read-only></me-rating>
Max Stars
<me-rating value="7" max="10" read-only></me-rating>
Disabled
<me-rating value="3" disabled></me-rating>
API
| Attribute | Type | Default | Description |
value | number | 0 | Selected rating value. |
max | number | 5 | Total number of stars. |
precision | 1 | 0.5 | 1 | Minimum increment for rating selection. |
size | small | medium | large | medium | Star size. |
color | primary | secondary | (default yellow) | — | Star fill color. |
read-only | boolean | false | Disables interaction without greying out. |
disabled | boolean | false | Disables interaction with reduced opacity. |
Events
| Event | Detail | Description |
me-change | { value: number } | Fired when the rating changes. Clicking the same value resets to 0. |