A row of raised toggle buttons, like bold, italic and underline in an editor. Single or multiple mode, each button with aria-pressed.
Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.
| Prop | Type | Default | Description |
|---|---|---|---|
| items | ToggleItem[] | The buttons in the group. | |
| type | "single" | "multiple" | "multiple" | "single" allows one pressed item at most, "multiple" allows any number. |
| value | string[] | Pressed values. Set it to control the component. | |
| defaultValue | string[] | [] | Pressed values at the start when uncontrolled. |
| onValueChange | (value: string[]) => void | Called with the new list of pressed values. | |
| size | "sm" | "md" | "md" | Size of the buttons. |
| aria-label | string | Required: names the group for screen readers. | |
| className | string | Extra classes added to the outer element. |