Actions

Toolbar

A row of icon buttons on a tinted track, with hairline separators where groups change.

Examples

Toolbar


Toggles

A pressed button keeps its tint and bottom edge; data-toggle flips it on click.

Anatomy

.toolbarInline row on a flat tinted track.
> .btnButtons, usually data-icon. They have no fill until hovered, pressed or aria-pressed="true".
> hrOptional 1px vertical separator between groups of buttons.

API

AttributeValuesDescription
aria-pressedon > .btntruefalseToggle buttons: the pressed one keeps its tint and edge. See Button.
data-toggleon > .btnbooleanWith aria-pressed, aequitas.js flips the state on click.

Behaviour

Clicking a .btn[data-toggle] in the toolbar flips its aria-pressed. Nothing else is scripted: there is no arrow-key focus movement between buttons.

From aequitas.js. It initialises itself and enhances markup added later on its own, so it works the same in an SPA.

Accessibility

  • Every icon-only button needs an aria-label.
  • Give the row role="group" and an aria-label. role="toolbar" promises arrow-key navigation, which aequitas.js does not provide; add it only with your own roving focus.
  • The <hr> is announced as a separator between groups.
KeyEffect
TabMoves to the next button. Each button is its own tab stop.
Enter / SpaceActivates or toggles the focused button.
Jump to
ProportionFoundations
MaterialFoundations
PresetsFoundations
ShellLayouts · Application
Container and stacksLayouts · Pages
SplitLayouts · Pages
Grid, bento, masonryLayouts · Pages
Switcher and rowLayouts · Pages
↑↓Move↵OpenescClose