Button Group

Joins related buttons into a single control.

Installation

  1. Add the registryOnce per project
  2. Add button-group

Usage

The group has the group role. Give it an aria-label when its purpose isn't clear from the buttons alone.

Composition

Examples

With text

ButtonGroupText adds a label or count beside the buttons. For text attached to an input, use Input Group.

Range
1.2k

Split button

ButtonGroupSeparator divides a main action from a menu of related ones.

Nested

Nest groups to space out sets of buttons.

Vertical

Set orientation="vertical" to stack the buttons.

Props

ButtonGroupText can render a <label> instead of a <div> with render.

The tables leave out className, style and render. Parts built on Base UI take them as its styling and composition guides describe.

ButtonGroup

ButtonGroupSeparator