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: Leading — format toggle

icon renders a 16px icon before the label (Figma Icon=Leading).

Icon: Only — alignment controls

iconOnly makes a square button (Figma Icon=Only). Pair with aria-label.

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.

Size — sm and md

Props

PropTypeDefaultDescription
size"sm" | "md""md"Figma Size — 36px or 40px high
orientation"horizontal" | "vertical""horizontal"Layout direction of the group
children*ReactNode—GroupButton children
classNamestring—Additional CSS classes on the group wrapper

Props

PropTypeDefaultDescription
activebooleanfalseHighlights this button as the selected option
iconReactNode—Figma Icon=Leading — icon before the label
iconOnlybooleanfalseFigma Icon=Only — square button; children is the icon
activeTone"brand" | "gray""brand"Active-state look — brand tint or neutral gray
disabledbooleanfalseDims the button and blocks clicks
onClick() => void—Click handler
aria-labelstring—Required when button is icon-only (no visible text)
classNamestring—Additional CSS classes
Base component → Button groupswww.pepulux.com

Notes and documentation

Space for notes, documentation, and best practices for using these components.

Related actions, visually joined

A button group joins controls that act on the same thing — a view switcher, alignment tools or a period selector. Only one item is active at a time unless the group is a set of toggles.

Use the leading-icon variant when icons clarify the label, and icon-only when space is tight (always add an aria-label).