Button Group
Groups related buttons with shared borders and separators, for toolbars, split buttons, and segmented actions.
Installation
Bash
Usage
Direct children with a data-slot (buttons, inputs, select triggers) get
their corner radius and borders merged automatically. Nest multiple
ButtonGroups to keep separate clusters spaced apart. Outline buttons
rarely need separators — their own borders divide them; use
ButtonGroupSeparator with filled variants like secondary.
Examples
Split button
A split button pairs a primary action with a ButtonGroupSeparator and a
dropdown trigger for secondary actions.
API reference
ButtonGroup
Extends div with role="group". Label it with aria-label or
aria-labelledby when the grouping is meaningful to screen readers.
| Prop | Type | Default |
|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" |
ButtonGroupSeparator
Extends Separator — all Separator props apply. Sized to stretch across the group.
| Prop | Type | Default |
|---|---|---|
orientation | "horizontal" | "vertical" | "vertical" |
ButtonGroupText
Static text styled to sit flush between buttons. Supports the Base UI
render prop to swap the underlying element (for example a label).
| Prop | Type | Default |
|---|---|---|
render | React.ReactElement | div |
buttonGroupVariants is also exported for composing the group styles
onto your own elements.