CheckboxGroup

A set of checkboxes sharing a single array `v-model`.

html
<UiCheckboxGroup :items="..." />

Items

required

items are the options, each a label and a value. An item can also carry its own description or a disabled flag.

Model value

modelValue is the checked values, two-way bound — always an array.

email

modelValue is always an array of the selected values, even if only one item can realistically be checked — there's no single-value mode (use RadioGroup for that).

Default value

defaultValue sets which options start checked when uncontrolled.

Legend

legend is the heading above the options — what the whole group is asking, stated once so each label doesn't have to repeat it.

Notification channels

Required

required adds an asterisk to the legend.

Interests*

Disabled

Disables the whole group. Individual options carry their own disabled flag — the first group below mixes both.

Color

color is the checked indicator's color.

Variant

variant sets the shape of each option. list stacks plain rows; card wraps each one in a bordered, highlightable surface, which pairs well with per-item descriptions.

Orientation

orientation stacks the options or lays them in a row. Vertical is the safer default — a row only works for two or three short labels, and wraps badly on narrow screens.

vertical (default)

horizontal

Indicator

indicator sets which side the box sits on, or hidden to drop it — for card options where the highlight already says which are checked.


API Reference

Generated from the component's source — props, slots and emits as the component actually declares them.

Props

Prop
Type
Default
Description
itemsrequired
CheckboxGroupItem[]
The list of checkbox options to render.
(string | number)[]
Controls the selected values. Omit this to let the group manage its own state internally (starting from `defaultValue`); pass it to fully control the selection yourself.
(string | number)[]
The selected values when uncontrolled.
string
Heading text displayed above the group of options.
boolean
false
Shows a required asterisk next to the legend.
boolean
false
Disables the whole group, preventing any selection changes.
"neutral" | "primary" | "secondary" | "success" | "error" | "warning" | "info" | "pending"
'neutral'
Color of the checked checkbox indicators.
"list" | "card"
'list'
Visual style of each option; 'card' wraps each option in a bordered, highlightable card.
"horizontal" | "vertical"
'vertical'
Layout direction of the options.
"start" | "end" | "hidden"
'start'
Position of the checkbox indicator relative to the label; 'hidden' removes it entirely.

Emits

Event
Payload
Description
update:modelValue
[value: (string | number)[]]

Types

ts
interface CheckboxGroupItem {
    label?: string;
    description?: string;
    value: string | number;
    disabled?: boolean;
}