axi-designv1.50.0

Shells

Toolbar

The strip of controls above a list: search, sort, filters. A raised surface holding controls, wrapping rather than overflowing.

.axi-toolbar .axi-toolbar--float .axi-toolbar--nowrap

Rule 3's two steps nest here the way they do in a notice: the toolbar takes the panel border and block, and every control inside it takes the control step. That is the whole reason a toolbar is a component rather than a .axi-row - it is a surface the controls sit on, and it has to be the heavier of the two weights or the controls read as floating.

On a phone the panel step drops to the control step, because the offset blocks eat horizontal room a narrow viewport does not have.

FLOAT. .axi-toolbar--float is for a toolbar pinned over content that moves under it rather than one sitting above content that does not: transport controls over a map or a replay, a readout over a chart. It changes one thing, the surface, and says exactly what .axi-panel--float and .axi-rail--float say - --axi-surface is a translucent tint under a theme like glass, which reads as a pane only while what is behind it holds still. A strip above a list is not that case and keeps the plain surface.

WRAP. The default wrap is right for a strip above a list, where losing a filter off the edge is worse than a second line. It is wrong for a bar whose height other things are positioned against, because a wrap moves all of them: reach for .axi-toolbar--nowrap there, and give the one child that can absorb the width flex: 1; min-width: 0.

PADDING. --axi-toolbar-pad is the knob. The default 14px is a figure for a strip above a list; a transport bar is the same object at a third of the height, and before the knob existed its only way to say so was to write its own padding and stop being a toolbar.

Search, sort and a filter menu

<div class="axi-toolbar">
  <div class="axi-search" style="flex: 1 1 200px; max-width: 260px">
    <span class="axi-search__icon" aria-hidden="true"><svg class="axi-icon"><use href="#axi-search"/></svg></span>
    <label class="axi-sr-only" for="toolbar-demo-q">Search</label>
    <input class="axi-input" id="toolbar-demo-q" placeholder="Search…">
  </div>
  <label class="axi-sr-only" for="toolbar-demo-sort">Sort</label>
  <select class="axi-select" id="toolbar-demo-sort">
    <option>Sort: name</option>
    <option>Sort: newest</option>
  </select>
  <button class="axi-btn axi-btn--dashed" type="button" aria-expanded="false">Filters <span class="axi-badge-count">3</span></button>
</div>

Knobs

PropertySetsFallback
--axi-toolbar-padthe padding inside an .axi-toolbar14px

Rules this answers