Skip to content

ButtonGroup

[axButtonGroup] is an attribute directive-component that visually joins a set of sibling buttons: it rounds the outer corners of the first/last children, sharpens the inner corners between siblings, and removes duplicate borders. It works with Button, IconButton, and Toggle children.

import { AxButtonGroupComponent, AxButtonComponent } from '@axisui-ng/buttons';
<div axButtonGroup ariaLabel="Text alignment">
<ax-button>Left</ax-button>
<ax-button>Center</ax-button>
<ax-button>Right</ax-button>
</div>
<!-- vertical -->
<div axButtonGroup orientation="vertical" ariaLabel="Sort">
<ax-button>Asc</ax-button>
<ax-button>Desc</ax-button>
</div>
InputTypeDefaultNotes
orientation'horizontal' | 'vertical''horizontal'Layout direction.
ariaLabelstring | nullnullAccessible label; required when the group has no visible heading.
Slot / markerNotes
DefaultSibling children (ax-button, ax-icon-button, ax-toggle, etc.). The group only styles corners/borders; children keep their own variants.

Applies role="group" with the optional ariaLabel. For a toolbar of toggles with selection and roving tabindex, prefer ToggleGroup.

Interactive examples live in Storybook under Buttons / ButtonGroup. Run pnpm storybook to explore them.