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.

Dark previewReplay preview

Orientation

Set orientation to vertical to stack the buttons.

Dark previewReplay preview

Size

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

Dark previewReplay preview

Nested

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

Dark previewReplay preview

Separator

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

Dark previewReplay preview

Split

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

Dark previewReplay preview

Input

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

Dark previewReplay preview

Dropdown Menu

Use a DropdownMenu trigger as the trailing button.

Dark previewReplay preview

Select

A Select can join the group as its leading control.

Dark previewReplay preview

Vertical

Project extra: the vertical group on its own.

Dark previewReplay 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.