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.
import { ButtonComponent, ButtonGroupComponent } from '@okaapi-ui/angular';Actions on one thing
Each button is still a normal button: Tab reaches every one.
<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
<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 need | Use |
|---|---|
| One choice that changes the view | Segmented control |
| Many controls with arrow-key movement, as in an editor | Toolbar |
| More actions than fit on a phone | Menu |
Inputs
| Name | Type | Default | What it does |
|---|---|---|---|
label | string | — | Required. What the buttons do together, for screen readers. |
Keyboard and screen readers
| Keys | What they do |
|---|---|
| Tab | Move from button to button. |
- A named group, read before its buttons.