Skip to content

ButtonGroup

Give related actions a shared accessible name.

alpina-ui/ui/button-group

Interactive preview

Usage notes

Give related actions a group name. Keep them in task order so keyboard users reach them in the same sequence in a narrow layout.

When to use

Present closely related actions on the same object, such as printing or downloading its receipt.

When to avoid

Separate a destructive action from a row of routine actions when a mistaken activation would be costly.

Accessibility

Name the group and keep its focus order consistent when buttons wrap to a second row.

Keys
KeyAction
Tab / Shift+TabMove between enabled controls in the group.
Enter / SpaceActivate the focused button.

Content

Use matching short verbs with objects where needed. Make each action understandable when announced on its own.

Use
Print receipt / Download receipt
Avoid
Action 1 / Action 2

Copy in four languages

German
Beleg drucken13 characters
French
Imprimer le reçu16 characters
Italian
Stampa ricevuta15 characters
Romansh
Stampar il quittament21 characters
Add to your project
npx --no-install alpina add button-group