Reference
Rating Group
RatingGroup, dressed in the paper-and-ink system: a row of quiet seals whose glyphs take the primary pigment as they light up. The parts — Root, Label, Control, Item, HiddenInput (plus the Context and ItemContext render helpers).
Root · Label · Item · Control
#Control
A styled part — no props of its own; it takes the anatomy's shared styling.
#HiddenInput
A styled part — no props of its own; it takes the anatomy's shared styling.
#ItemContext
A styled part — no props of its own; it takes the anatomy's shared styling.
#Item
| Prop | Type | Default | Description |
|---|---|---|---|
index | number | — |
#Label
A styled part — no props of its own; it takes the anatomy's shared styling.
#Root
| Prop | Type | Default | Description |
|---|---|---|---|
size | String as PropType<"sm" | "md" | "lg"> | "md" | One rung of the control-height ladder every seal stands on. |
allowHalf | boolean | Whether to allow half stars. | |
autoFocus | boolean | Whether to autofocus the rating. | |
count | number | 5 | The total number of ratings. |
defaultValue | number | The initial value of the rating when rendered. Use when you don't need to control the value of the rating. | |
disabled | boolean | Whether the rating is disabled. | |
form | string | The associate form of the underlying input element. | |
id | string | The unique identifier of the machine. | |
ids | Partial<{ root: string; label: string; hiddenInput: string; control: string; item(id: string): string; }> | The ids of the elements in the rating. Useful for composition. | |
modelValue | number | The v-model value of the rating group | |
name | string | The name attribute of the rating element (used in forms). | |
readOnly | boolean | Whether the rating is readonly. | |
required | boolean | Whether the rating is required. | |
translations | ratingGroup.IntlTranslations | Specifies the localized strings that identifies the accessibility elements and their states |
| Event | Payload |
|---|---|
valueChange | details: ValueChangeDetails |
update:modelValue | value: number |
hoverChange | details: HoverChangeDetails |