Toggle Sidebar B
AppearanceLight & dark mode D

Button Group

Joins a row or column of Buttons (or inputs) so adjacent corners and borders collapse cleanly. Use for segmented controls, attached input + button, or toolbars.

Default

Buttons sit flush against each other with shared borders and rounded outer ends.

Replay preview

Orientation

Set orientation to vertical to stack the buttons.

Replay preview

Size

Control the size of buttons using the size prop on individual buttons.

Replay preview

Nested

ButtonGroups nest: each child group keeps its own rounded ends.

Replay preview

Separator

ButtonGroupSeparator draws a divider that matches the group's border.

Replay preview

Split

Create a split button group by adding two buttons separated by a ButtonGroupSeparator.

Replay preview

Input

Pair an Input with buttons so they read as one control.

Replay preview

Dropdown Menu

Use a DropdownMenu trigger as the trailing button.

Replay preview

Select

A Select can join the group as its leading control.

Replay preview

Vertical

Project extra: the vertical group on its own.

Replay preview

API Reference

ButtonGroup

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Axis of the group.
classstringExtra classes, merged with cn().

ButtonGroupSeparator / ButtonGroupText

PropTypeDefaultDescription
classstringVisual separator and inline static text label inside a group.