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.
Multiple
Allow multiple items pressed at once.
Outline
Set variant to outline for bordered items.
Sizes
sm, default, and lg groups.
Spacing
Add a gap class to separate the items instead of joining them.
Vertical
Set orientation to vertical to stack the items.
Disabled
The disabled attribute blocks the whole group.
Text options
A single-select group of text labels bound to a ref.
API Reference
ToggleGroup
ToggleGroupItem
Accessibility
Keyboard shortcuts and ARIA behavior.
- 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.