Toggle Group
A set of two-state buttons that can be toggled on or off.
Installation
Usage
<ToggleGroup type="single">
<ToggleGroupItem Value="a">A</ToggleGroupItem>
<ToggleGroupItem Value="b">B</ToggleGroupItem>
<ToggleGroupItem Value="c">C</ToggleGroupItem>
</ToggleGroup>Composition
Use the following composition to build a ToggleGroup:
ToggleGroup
├── ToggleGroupItem
└── ToggleGroupItemOutline
Use variant="outline" for an outline style.
Size
Use the Size parameter to change the size of the toggle group.
Spacing
Use Spacing to add spacing between toggle group items.
Vertical
Use orientation="vertical" for vertical toggle groups.
Disabled
Custom
A custom toggle group example.
Use font-normal to set the font weight.
RTL
To enable RTL support in Blazix, see the RTL configuration guide.
Translated with AI for the demo, so it may have mistakes.
API Reference
ToggleGroup
Other attributes are passed to the element it renders.
ToggleGroupItem
Other attributes are passed to the element it renders.
Changelog
2026-05-17 Default Spacing
Changed the default Spacing from 0 to 2 so toggle groups render with space between items by default. Use Spacing="0" for connected items.