Button Group
Welds adjacent controls into one unit: the inner corners square off and the touching borders collapse to a single seam, so a row of buttons reads as one control instead of a row of pills.
It welds whatever you put in it — buttons, an input plus a button, a select plus a button — which is what makes it the primitive behind attached actions, split buttons, and search fields.
Basic Usage
Split button
A primary action welded to a menu of secondary ones — the canonical use.
Search field
An input welded to its button. The group squares the seam; the input keeps its own border and focus ring.
Vertical
Not a toolbar
Button Group is a visual weld: every control inside stays individually Tab-reachable, which is what people expect from attached buttons.
If you want a roving keyboard model — one Tab stop for the whole cluster, arrow keys to move between controls — that is Toolbar. Reach for it when the cluster is a dense bar of many controls.
Related: Segmented Control is the right choice when the buttons are mutually-exclusive options rather than separate actions.
Input addons
For a text affix or an icon inside a single field — https://, $, @, a
search glyph, a clear or copy button — you do not need a group.
Input already takes prefix / suffix (and clearable /
copyable) inside one shared border and focus ring.
Use Button Group when you are welding separate controls together.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label |
string|null | null |
Accessible name for the group |
orientation |
string | 'horizontal' |
horizontal or vertical |
scope |
string|null | null |
Scoped personalization name |
Accessibility
- The group is
role="group"; give it alabelso assistive technology can announce what the cluster is for. - Every control stays Tab-reachable — no roving tabindex. That is Toolbar's job.
- A focused control is lifted above the collapsed seam (
z-index), so its focus ring is never clipped by its neighbor — a weld must not cost focus visibility (WCAG 2.4.7). - Icon-only children still need their own
aria-label. - RTL mirrors for free. The weld uses CSS logical properties
(
border-start-start-radius,margin-inline-start), so it flips correctly underdir="rtl"with no extra rules and no separate stylesheet.
Keyboard Interaction
| Key | Action |
|---|---|
| Tab | Move to the next control in the group |
| Enter / Space | Activate the focused control |
Pitfalls
- Do not use it for mutually-exclusive options — that is Segmented Control.
- Do not use it for a dense control bar — that is Toolbar, which brings the roving keyboard model.
- Do not reach for it for a text affix — Input's
prefix/suffixalready share one border.
Design Tokens
| Element | Token |
|---|---|
| Seam width | --border-wk-width (the collapse is a negative margin of exactly this) |
| Corner radii | inherited from the welded children |