Shells
Rail
Vertical navigation, for a set too large for a tab strip to hold. The category you are on is filled and blocked; a section under it is brightened text.
Deliberately the same grammar as .axi-tabs: the thing you are on is
filled with the accent and blocked, and everything else is transparent until
hovered. "Where am I" is one question and it gets one answer however the app
happens to be laying the set out.
What a rail adds over a strip is a second level, and the two levels are not
drawn alike. A category is a place, so .axi-rail__item takes the fill. A
section under it is only where the page is scrolled to - a smaller claim - so
.axi-rail__subitem is brightened text with no fill and no edge. Two fills at
two levels would leave the reader deciding which of them is the answer.
aria-current marks the current item at either level, and any value counts:
page for a rail that navigates between views, location for one that moves
within a single view. The treatment means the same thing either way.
.axi-rail--flush is for a rail that is the edge of the page rather than an
object standing in the layout - pinned to the viewport, or the contents of a
drawer. It keeps the one border facing the content and drops the radius and the
block, because a block needs somewhere to fall. That border is
border-inline-end, so it follows the writing direction rather than always
landing on the right; what it still assumes is the leading edge. A rail
pinned to the trailing edge of its content needs the opposite border and has no
way to ask for it yet.
.axi-rail--float is for a rail the page scrolls behind rather than beside.
It changes one thing, the surface: --axi-surface is a translucent tint under a
theme like glass, which reads as a pane only while what is behind it holds
still, and a rail pinned over a scrolling table is the case where it does not.
It is orthogonal to --flush, and a pinned rail usually wants both.
.axi-rail__nav--quiet is for the case where the accent is already spent. A
metric picker beside the table it drives, a filter list beside its results: the
pane next to it holds the accent, and a filled row in the rail would be a second
claim on the same screen about where you are. The refusal is the one
.axi-rail__subitem already makes inside a single rail, one container further
out. It cannot borrow the subitem's answer, though - a subitem is one of a few
leaves under an open category, while a picker is twenty rows and the primary
control of its own panel, so brightened text alone loses the selection. So the
row rises as a hovered row does and the accent arrives on its leading edge, in
the border .axi-rail__item already reserves at the control weight and draws
transparent. The modifier goes on the list rather than on .axi-rail, because a
nested picker usually has no rail box at all - it sits directly in the panel or
well that holds it, and a 208px width and a panel block are the opposite of what
it wants.
A rail with an open category
<aside class="axi-rail" style="height: 260px">
<nav class="axi-rail__nav">
<button class="axi-rail__item" type="button">Overview</button>
<button class="axi-rail__item" type="button" aria-current="page">Offense</button>
<div class="axi-rail__sub">
<button class="axi-rail__subitem" type="button" aria-current="location">Damage</button>
<button class="axi-rail__subitem" type="button">Bursts</button>
</div>
<button class="axi-rail__item" type="button">Defense<span class="axi-rail__mark">Local</span></button>
<button class="axi-rail__item" type="button">Support</button>
</nav>
</aside>
A nested picker, where the pane beside it holds the accent
The selected row rises and takes the accent on its leading edge, not as a fill<div class="axi-row" style="--axi-row-gap: 12px; align-items: stretch">
<div class="axi-well" style="width: 168px">
<nav class="axi-rail__nav axi-rail__nav--quiet">
<button class="axi-rail__item" type="button">Damage</button>
<button class="axi-rail__item" type="button" aria-current="location">Downs and kills</button>
<button class="axi-rail__item" type="button">Interrupts</button>
</nav>
</div>
<div class="axi-panel" style="flex: 1">
<button class="axi-btn axi-btn--primary" type="button">Export</button>
</div>
</div>
Flush against the page edge
No radius, no block - only the border facing the contentContent
<div class="axi-row" style="--axi-row-gap: 0; align-items: stretch; height: 160px">
<aside class="axi-rail axi-rail--flush">
<nav class="axi-rail__nav">
<button class="axi-rail__item" type="button" aria-current="page">Report</button>
<button class="axi-rail__item" type="button">Roster</button>
</nav>
</aside>
<div style="flex: 1; padding: 16px">
<p class="axi-eyebrow">Content</p>
</div>
</div>
Knobs
| Property | Sets | Fallback |
|---|---|---|
--axi-rail-w | an .axi-rail's width, for labels longer than the default holds | 208px |
--axi-rail-pad | the padding inside an .axi-rail | 10px |