ToggleGroup
v1.0.2Updated 27 Aug 2026Two-state toggle buttons built on Radix Toggle / ToggleGroup. Ships a standalone Toggle (aria-pressed) plus a ToggleGroup with single or multiple selection — ideal for view switchers, list-page status filters and formatt
Preview
Live · 13 stories▸Why this is recommendedtogglesegmentedfilterpressed+3
The default, out-of-the-box ToggleGroup.
- ✓View-mode switchers (list / grid / table)
- ✓Status filters on list pages
- ✓Rich-text formatting toolbars
- ✓Report period selectors (day / week / month)
- Standalone Toggle with aria-pressed (Space/Enter)
- Group single or multiple selection
- Controlled and uncontrolled (value / defaultValue / onValueChange)
- Variants: default (joined outline segments) / soft (segmented control on muted track)
- Sizes sm / default / lg
- Six recipe tones for the pressed state, per-item tone overrides
- Roving-tabindex arrow-key navigation, Home/End
- Horizontal or vertical orientation
- Icon-only items (aria-label required)
- ✕Page navigation (use Tabs)
- ✕On/off settings rows (use Switch)
- ✕Exclusive form fields with labels/descriptions (use RadioGroup)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
typeSelection mode (ToggleGroup only)
yesvalueControlled value(s)
—defaultValueUncontrolled initial value(s)
—onValueChangeSelection change callback
—variantJoined outline segments or muted segmented control
—sizeItem height (h-7 / h-8 / h-9)
—toneAccent of the pressed state (shared recipe)
—orientationLayout direction + arrow-key axis
—Every tonal component shares the same tone × emphasis API, so the pair looks identical across Button, Badge, Alert and more.