Toggle Group
A set of two-state buttons that can be toggled on or off.
Installation
Usage
<ToggleGroup multiple=false>
<ToggleGroup.Item value="a"> {"A"->React.string} </ToggleGroup.Item>
<ToggleGroup.Item value="b"> {"B"->React.string} </ToggleGroup.Item>
<ToggleGroup.Item value="c"> {"C"->React.string} </ToggleGroup.Item>
</ToggleGroup>Examples
Outline
Use variant=Outline for an outline style.
Size
Use the size prop 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.
API Reference
See the Base UI Toggle Group documentation.