Skip to main content

ButtonGroup

Joins Buttons into one segmented control (toggles, pagination, split actions).

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

Joins Buttons into one segmented control (toggles, pagination, split actions).

Accessibility​

Fully keyboard operable: Tab to focus, Enter/Space to activate. The visible focus ring uses --focus-ring — never remove it. Provide an accessible label (aria-label) for icon-only controls.

Install and import​

npx shadcn@latest add @prism/button-group
import { ButtonGroup } from '@/components/prism/ButtonGroup';

In a no-build prototype, read it from the bundle instead: const { ButtonGroup } = window.PrismDesignSystem_39d121;

Props​

PropTypeRequiredDescription
orientation"horizontal" | "vertical"—Lay the segments in a row (default) or a column.
size"sm" | "md" | "lg" | "xl"—Optional size applied to every child Button that doesn't set its own.
childrenReact.ReactNode—Button / IconButton children to join.
classNamestring—