Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

Chapter 03 Actions

Button group

Buttons that belong together, joined into one bar. The group has a name, so a screen reader says what the buttons are for before it reads them.

Use it in Angular
import { ButtonComponent, ButtonGroupComponent } from '@okaapi-ui/angular';

Actions on one thing

Each button is still a normal button: Tab reaches every one.

Angular
<ui-button-group label="Invoice">
  <button ui-button variant="secondary" type="button">Download</button>
  <button ui-button variant="secondary" type="button">Print</button>
  <button ui-button variant="secondary" type="button">Email</button>
</ui-button-group>

In Arabic

Angular
<ui-button-group label="الفاتورة">
  <button ui-button variant="secondary" type="button">تنزيل</button>
  <button ui-button variant="secondary" type="button">طباعة</button>
</ui-button-group>

When to use something else

If you needUse
One choice that changes the viewSegmented control
Many controls with arrow-key movement, as in an editorToolbar
More actions than fit on a phoneMenu

Inputs

NameTypeDefaultWhat it does
labelstring — Required. What the buttons do together, for screen readers.

Keyboard and screen readers

KeysWhat they do
Tab Move from button to button.
  • A named group, read before its buttons.