ButtonGroup

Groups related buttons into a connected control.

Quick Preview

Best value

Composition

Use this public composition when building ButtonGroup:

ButtonGroup
├── Button
├── ButtonGroupSeparator
└── ButtonGroupText

Usage

<ButtonGroup>
  <Button>Monthly</Button>
  <Button>Yearly</Button>
</ButtonGroup>

Examples

Orientation

Use orientation to group controls horizontally for toolbars or vertically for stacked choice sets.

Horizontal

Props

Prop/APITypeDefaultDescription
orientation`"horizontal""vertical"`"horizontal"
size`"sm""md""lg"`
classNamestring-Local layout or spacing overrides.
native/root propsReact component props-Passed through to the underlying root or primitive.

Accessibility

  • Preserve the documented ButtonGroup composition so labels, triggers, content, and controls remain connected.
  • Provide visible labels or accessible names for interactive controls.
  • Preserve the component-provided focus, keyboard, disabled, and invalid-state behavior.
  • Do not communicate state with color alone; include text, icons, or helper copy.

On this page