Skip to content
SevenUI
Sign in
On this page

Button Group

Groups related buttons with shared borders and separators, for toolbars, split buttons, and segmented actions.

Page 3 of 12

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.

PropTypeDefault
orientation"horizontal" | "vertical""horizontal"

ButtonGroupSeparator

Extends Separator — all Separator props apply. Sized to stretch across the group.

PropTypeDefault
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).

PropTypeDefault
renderReact.ReactElementdiv

buttonGroupVariants is also exported for composing the group styles onto your own elements.

Was this page helpful?