Rating
The Rating component displays an interactive set of icons (such as stars) for users to select a rating value. It supports fractional ratings, custom shapes, color variants, and size options for flexible UI integration.
The Rating component displays an interactive set of icons (such as stars) for users to select a rating value. It supports fractional ratings, custom shapes, color variants, and size options for flexible UI integration.
Rating is a standalone component.
The Rating component displays a row of icons (such as stars) that allow users to select a value. Supports fractional ratings, custom shapes, color variants, and sizes.
| Rating Props | Type | Description |
|---|---|---|
modelValue | number | string | |
count | number | string | The total number of rating icons to display. |
half | boolean | Allows selection of half values (e.g., 3.5). |
disabled | boolean | Disables interaction and dims the component. |
bg | string | Custom background color class for icons. |
color | string | Sets the color theme. Options: |
| neutral | boolean | Shortcut for |
| primary | boolean | Shortcut for |
| secondary | boolean | Shortcut for |
| accent | boolean | Shortcut for |
| info | boolean | Shortcut for |
| success | boolean | Shortcut for |
| warning | boolean | Shortcut for |
| error | boolean | Shortcut for |
shape | string | Sets the icon shape. Options: |
| squircle | boolean | Shortcut for |
| heart | boolean | Shortcut for |
| hexagon | boolean | Shortcut for |
| hexagon2 | boolean | Shortcut for |
| decagon | boolean | Shortcut for |
| pentagon | boolean | Shortcut for |
| diamond | boolean | Shortcut for |
| square | boolean | Shortcut for |
| circle | boolean | Shortcut for |
| star | boolean | Shortcut for |
| star2 | boolean | Shortcut for |
| triangle | boolean | Shortcut for |
| triangle2 | boolean | Shortcut for |
| triangle3 | boolean | Shortcut for |
| triangle4 | boolean | Shortcut for |
size | 'xl' | 'lg' | 'md' | 'sm' | 'xs'
| Sets the icon size. |
| xl | boolean | Shortcut for |
| lg | boolean | Shortcut for |
| md | boolean | Shortcut for |
| sm | boolean | Shortcut for |
| xs | boolean | Shortcut for |
| Rating Events | Arguments | Description |
|---|---|---|
update:modelValue |
Rating components with different color variants.
Custom number of rating icons.
A disabled rating component.
Fractional (half) ratings.
Different rating icon shapes.
Different rating icon sizes.