Toggle Group
Single- or multi-select group of toggle buttons sharing variant/size context.
Default
Disabled
Multiple
Sizes
sm
default
lg
Variants
Default
Outline
Vertical
Installation
npx shadcn@latest add @byronwade/toggle-groupProps
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string[] | — | Controlled array of pressed item values. |
| defaultValue | string[] | — | Uncontrolled initial pressed values. |
| onValueChange | (value: string[]) => void | — | Fires when the pressed items change. |
| multiple | boolean | false | Allow more than one item pressed at once. |
| variant | "default" | "outline" | "default" | Visual style shared by all items. |
| size | "default" | "sm" | "lg" | "default" | Item size shared by all items. |
| orientation | "horizontal" | "vertical" | "horizontal" | Layout axis of the group. |
| disabled | boolean | false | Disable the entire group. |