Button Group

Joins related buttons into one control.

@paneui/themeclass-variance-authority
Seats

Installation

pnpm dlx shadcn@latest add @paneui/button-group

Usage

Examples

Vertical

Nested

Accessibility

The group has role="group"; give it an aria-label. For a set where one option is chosen, use ToggleGroup instead.

API Reference

ButtonGroup

Also accepts every prop of div.

orientation= "horizontal"
"horizontal" | "vertical"
Direction of the joined buttons.
PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Direction of the joined buttons.

ButtonGroupSeparator

A hairline between filled buttons. Also accepts every prop of div.

orientation= "vertical"
"horizontal" | "vertical"
PropTypeDefaultDescription
orientation"horizontal" | "vertical""vertical"

ButtonGroupText

A label on the group's fill. Also accepts every prop of div.