Toggle Sidebar B
AppearanceLight & dark mode D

Toggle Group

Group of Toggles where at most one (single) or many (multiple) can be pressed at a time. Often used as a visual filter or text-alignment picker.

Default

Single-select toggle group.

Dark previewReplay preview

Multiple

Allow multiple items pressed at once.

Dark previewReplay preview

Outline

Set variant to outline for bordered items.

Dark previewReplay preview

Sizes

sm, default, and lg groups.

Dark previewReplay preview

Spacing

Add a gap class to separate the items instead of joining them.

Dark previewReplay preview

Vertical

Set orientation to vertical to stack the items.

Dark previewReplay preview

Disabled

The disabled attribute blocks the whole group.

Dark previewReplay preview

Text options

A single-select group of text labels bound to a ref.

Dark previewReplay preview

API Reference

ToggleGroup

PropTypeDefaultDescription
type"single" | "multiple""single"Selection mode.
modelValuestring | string[]Pressed value(s). Supports v-model.
variant"default" | "outline""default"Same as Toggle.
size"sm" | "default" | "lg""default"Same as Toggle.
EventDescription
update:modelValueFires when the pressed value(s) change. Enables v-model.

ToggleGroupItem

PropTypeDefaultDescription
valuestringUnique value identifying this item.
disabledbooleanfalseDisable this item.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
TabMoves focus into the group.
Moves to the previous item.
Moves to the next item.
Moves to the previous item.
Moves to the next item.
SpaceToggles the focused item.
EnterToggles the focused item.
  • Uses a roving tabindex; only one item is in the tab sequence at a time.
  • Single or multiple selection is conveyed via aria-pressed or aria-checked.