ToggleGroup
A set of two-state buttons that can be toggled on or off.
Usage
The ToggleGroup component allows users to select one or more options from a set of toggles.
Attached
Use the attached prop to visually connect the toggle items together into a unified group.
Multiple
Allow multiple items to be selected by setting the multiple prop to true.
Orientation
The toggle group can be oriented horizontally or vertically.
Controlled
Use the value and onValueChange props to control the selected items.
Disabled
The entire toggle group or individual items can be disabled.
API Reference
ToggleGroup
Manages the state of the toggle group and provides context for the toggle items.
| Prop | Type | Default |
|---|---|---|
| value | string | |
| disabled | boolean | false |
| asChild | boolean | false |
| multiple | boolean | false |
| onValueChange | (value: string) => void |
ToggleGroupItem
The toggle group item component.
| Prop | Type | Default |
|---|---|---|
| value | string | |
| disabled | boolean | false |
| asChild | boolean | false |

