ButtonGroup
Organize related actions and share size, tone, variant, and state across buttons.
Basic usage
Name the group with aria-label or aria-labelledby. Each button remains reachable with Tab and can set its own size, variant, or tone.
Layout
Use attached to join buttons. An attached horizontal group stays on one line, so keep labels short. A spaced horizontal group wraps when needed.
Vertical orientation
Use orientation="vertical" to stack actions. align positions the group along its main axis. With fullWidth, the group fills the available space and distributes width across its direct buttons.
States
Set disabled on the group to disable every button, including those with their own props. Try the control below.
API
ButtonGroup accepts native div attributes. Use buttons as direct children to join edges or distribute widths. Each button retains its own action.
| Prop | Values and behavior | Default |
|---|---|---|
orientation | horizontal, vertical | horizontal |
align | start, center, end | start |
attached | boolean | false |
fullWidth | boolean | false |
variant | solid, outline, soft, ghost, link | solid |
tone | primary, neutral, info, success, warning, danger | primary |
size | xs, sm, md, lg | md |
disabled | boolean | false |
aria-label / aria-labelledby | string | — |