Toolbar
A container for groups of tool buttons: role="toolbar" + aria-label, Tab enters and arrow keys move between buttons (roving tabindex — only the current item is focused).
Basic usage
Basic usage (native buttons)
Example
Combining with oas-button
Put oas-button elements in the slot (custom elements automatically join the roving behavior); use data-toolbar-ignore to exclude separators.
oas-button + separator
Example
Disabled items
Buttons with disabled / aria-disabled are skipped by arrow-key navigation (roving skips them).
Disabled items
Example
API
Slots
| Name | Description |
|---|---|
| default | — |
- The host has
role="toolbar";aria-labelcomes from the locale key (toolbar.label, default 「工具栏」) - Children that join roving: native controls (
button/input/select/textarea/a[href]), interactiveroles, custom elements (tag contains-); exclude them withdata-toolbar-ignoreoraria-hidden, anddisabled/aria-disabledare skipped automatically - Keyboard:
Tabenters (only the current item is tab-reachable),←/→(or↑/↓) moves between buttons,Home/Endjumps to the first/last