Button group
Group related buttons into a single set of actions. Compare standard, segmented, and outline button group styles.
Examples
Default
Breakpoints
Mobile
320pxMobile Lg
480pxTablet
640pxDesktop
1024pxbutton-group-demo.tsx
Segmented
Breakpoints
Mobile
320pxMobile Lg
480pxTablet
640pxDesktop
1024pxbutton-group-segmented-demo.tsx
Segmented Red
Breakpoints
Mobile
320pxMobile Lg
480pxTablet
640pxDesktop
1024pxbutton-group-segmented-red-demo.tsx
Segmented Outline
Breakpoints
Mobile
320pxMobile Lg
480pxTablet
640pxDesktop
1024pxbutton-group-segmented-outline-demo.tsx
Component API
Place ButtonGroup.Button parts inside Root. The root supplies shared Button styling defaults.
Root<div>
Groups related actions.
| Prop | Type | Default | Description |
|---|---|---|---|
segmented | boolean | false | Joins the buttons into one visual segment. |
variant | Button variant | — | Default color treatment for child buttons. |
size | Button size | — | Default size for child buttons. |
unstyled | boolean | — | Default text-link treatment for child buttons. |
Button<button>
Uses Button styling and can override the root variant, size, or unstyled setting.
| Prop | Type | Description |
|---|---|---|
variant | Button variant | Overrides the group variant. |
size | Button size | Overrides the group size. |
unstyled | boolean | Overrides the group text-link treatment. |
Accessibility
Choose labels that distinguish each action. The root supplies the group role; add an accessible group name when the relationship needs one.