Button Group

Horizontally or vertically grouped buttons that share borders. Use for mutually exclusive toggles or multi-select option sets.

import{ ButtonGroup, GroupButton } from "@pepulux/ui"

Toggle group — single selection

Classic date-range toggle. Only one button can be active at a time.

Icon + label — format toggle

Icons with text labels. Works well for view mode switches.

Icon-only — alignment controls

Icon-only buttons for compact toolbars.

Multi-select — text formatting

Multiple buttons can be active simultaneously. Toggle each independently.

Vertical orientation

Stacked vertically. Buttons share left/right borders instead of top/bottom.

With disabled buttons

Individual buttons within the group can be disabled.

Props

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Layout direction of the group
children*ReactNodeGroupButton children
classNamestringAdditional CSS classes on the group wrapper

Props

PropTypeDefaultDescription
activebooleanfalseHighlights this button as the selected option
disabledbooleanfalseDims the button and blocks clicks
onClick() => voidClick handler
aria-labelstringRequired when button is icon-only (no visible text)
classNamestringAdditional CSS classes