Button Group

Groups related buttons, joined into one control or spaced apart, such as a split button or a set of actions.
Stable
Web
iOS
Android
@advui/core
Source

Joined actions

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { Button, ButtonGroup } from '@advui/core'

<ButtonGroup aria-label="Message actions" variant="outline">
  <Button>Archive</Button>
  <Button>Report</Button>
</ButtonGroup>

Examples

Split button

A main action plus a menu of options.

Vertical and spaced

A vertical zoom control, and `attached={false}` for spaced actions.

API reference

ButtonGroup

PropTypeDefaultDescription
aria-labelstring—Names the group, e.g. "Message actions". Recommended.
attachedbooleantrueJoin the buttons into one control; `false` spaces them apart.
orientation'horizontal' | 'vertical''horizontal'Lay the buttons out in a row or a column.
variant'default' | 'secondary' | 'outline' | 'ghost' | 'destructive'—Variant for buttons that do not set their own.
size'sm' | 'md' | 'lg'—Size for buttons and icon buttons that do not set their own.

Accessibility

  • role="group" with an aria-label, so screen readers announce the buttons as one set.
  • Each button keeps its own name, state and place in the tab order. For one choice among options, use Toggle Group.
  • A focused button is raised above its neighbours, so its focus ring is never covered.
Keyboard interactions
KeyAction
TabMoves through the buttons one by one.

Platform notes

Web
A div with role="group".
iOS
Buttons keep their own touch targets; VoiceOver reads each one.
Android
Same as iOS.
Since v0.3.0Last updated Nov 2, 2026Edit this page on GitHub