Navigation rails and panel colours, the shared item model in the navigation
family, item states, and the command, menubar and nav variant: top
elements. The item model itself is in
schema-systems.md §15.4; the state serializer and owners
are in rendering-states.md.
Use nav.props.variant: rail for a compact primary rail, or sidebar for coloured side navigation. Omitting variant preserves the existing navigation treatment. Rail uses sidebar.collapsedWidth (64px by default); size.width overrides it. Its whole icon-and-label tile is clickable and at least 44×44px. iconStyle on items supports solid, regular and brands. Long labels retain their accessible name. collapsed hides the rail caption visually while preserving its accessible name.
Company skins can use nav.rail and nav.sidebar roles. Explicit nav/app_bar backgrounds paint the panel, including background set on the node itself. Inherited page/skin defaults alone preserve transparent legacy panels. A selected rail icon box or sidebar row uses accent for its fill and text for its foreground; choose a pair with at least 4.5:1 contrast. The no-variant selected style is unchanged.
Each kind is recognisable at a glance at the top level of content (surface depth 0), in card and line mode:
| Kind | Draws | Frame |
|---|---|---|
nav variant: sidebar |
a panel at sidebar.width (--wf-sidebar-w), white in card mode, one edge on the right, 8px inset |
B → edge |
nav variant: rail |
a narrow strip of icon tiles with a right edge. The current tile is plain: the light current fill in card mode (none in line mode) inside a strong 1.5 px solid edge, with its icon in ink, so the icon reaches 3:1 on the tile and the edge 3:1 on the rail. An item without an icon keeps an empty, aria-hidden tile, so the current one still shows its edge |
B → edge |
nav variant: top |
a bar across the width, header.height tall, with a bottom rule |
B → edge |
menubar |
a compact strip of menu titles, ruled above and below | B → edge |
menu |
the dropdown panel: 5px inset, radius 8 and a shadow in card mode, a solid edge in line mode. min-width: min(180px, 100%) and max-width: 100%, so it never overflows a narrow container; long labels end in an ellipsis, while shortcuts and chevrons never shrink |
T → surface |
nav without a variant, tab_bar |
unchanged | N, E |
The edges use --wf-panel-edge: --wf-line in card mode and
--wf-line-strong in line mode. The current row's fill shows on the white
panels. Skins still paint nav.sidebar and nav.rail inline, over the
white fill.
Chrome follows where the author put the element. Inside a framed container (a card, a modal, a persistent region), inside a dropdown, or inside a sidebar panel, the container owns the chrome and these elements draw none.
A template slot with role: sidebar draws the sidebar panel itself
(frame-rules rule 5, edge):
- a white fill in card mode;
- one edge on the side facing the content: right when it comes before the
main region, left after it, bottom or top in a stacked body
(
data-wf-edge-side); - a
card.paddinginset when no padding above 0 is authored.
Its nav, menu and menubar draw nothing of their own. A persistent
sidebar region stays a surface, as before.
In adaptive phone mode, a sidebar panel and a standalone sidebar or rail reflow like the region sidebar always did. Each becomes a full-width row across the top that scrolls inside itself, ruled below instead of beside, so it never forces horizontal overflow. Adaptive tablet mode keeps them beside the content.
Every navigation list reads the shared item model through its profile:
| Prop | Profile |
|---|---|
tab_bar.tabs, bottom_tab_bar.tabs, page_header.tabs |
tabs |
breadcrumb.items, stepper.steps, page_header.breadcrumb |
basic |
nav.items |
nav |
menu.items, action_sheet.items |
menu |
page_header.actions |
basic, through lib.actionButtons |
command.items, menubar.items |
canonical |
App-bar actions are glyph names, not items. Tab, crumb and step lists skip
separator and heading entries. Menus, the action sheet, nav, command
and menubar panels draw them: a separator is a rule, a heading a small
caption, and a group its heading followed by its items.
Tabs, nav rows, crumbs and steps have one "on" state each. It is decided in this order:
- An item's own
selected, or itscurrentwhenselectedis absent. Items markedtrueare exactly the ones on. - Otherwise the element's own rule:
nav: every row marked with the legacyactive: true, and every enabled row whoserouteis the page being rendered. Legacyactiveadds to route inference, as it always did, andactive: falsenever hides the current route.breadcrumbandpage_header.breadcrumb: the last crumb.stepper: step numbercurrent(default 1).- Tabs have no rule: nothing is on.
- The rule never turns on an item marked
selected: false(orcurrent: false).
nav decides across all its levels at once: a selected: true on a nested row
turns route inference off for the whole nav. pagination marks page page.
Menu, command and menubar rows keep selected (a highlighted row) and
current apart.
States go on the element that owns them, through lib.stateAttrs:
| Element | Markup | On | Disabled |
|---|---|---|---|
tab_bar tab without a route |
<button> |
aria-pressed="true" data-wf-selected |
native disabled, data-wf-disabled |
Routed tab, bottom_tab_bar and page_header tabs |
<a> or <span> |
aria-current="page" data-wf-current |
aria-disabled="true" data-wf-disabled |
nav row |
<a> or <span> |
aria-current="page" data-wf-current |
aria-disabled="true" data-wf-disabled |
| Crumb | <a> or <span> |
aria-current="location" data-wf-current |
aria-disabled="true" data-wf-disabled |
| Step | <span class="wf-step"> |
aria-current="step" data-wf-current |
aria-disabled="true" data-wf-disabled |
| Current page number or dot | <button> or <span> |
aria-current="page" data-wf-current |
— |
| Menu, command and menubar panel row | <a> or <span> |
data-wf-selected; current adds aria-current="true" data-wf-current |
aria-disabled="true" data-wf-disabled |
| Menubar title without a menu | <a> or <span> |
aria-current="page" data-wf-current |
aria-disabled="true" data-wf-disabled |
| Menubar title with a menu | <button> |
aria-current="page" data-wf-current, beside aria-expanded |
aria-disabled="true" data-wf-disabled |
| Action sheet row | <button> |
— | native disabled, data-wf-disabled |
A tab button that was blank or unselectable was already disabled; it keeps its
bare disabled attribute. Tab buttons keep aria-pressed semantics, and the
runtime updates data-wf-selected whenever it updates aria-pressed.
Disabled rows are drawn at reduced opacity. A selected menu or command row gets a fill in card mode and a dashed outline in line mode; a current one is bold. Legacy markup only gains attributes, so tabs, nav rows, crumbs, steps and page numbers that were already on look exactly as before.
An item route renders a link in nav, breadcrumb, tab_bar,
bottom_tab_bar, page_header crumbs and tabs, menu and command:
- A known route id is
<a href data-wf-route-target>. - An unknown route id is plain text, as before.
- A
disableditem has nohref: it is a<span>witharia-disabled. - When the element itself has an
interaction, no item links, so anchors never nest and a click runs only the element's interaction.page_headeractions then render as plain buttons. - The current crumb never links.
A menubar title without a menu links like a nav row. Its panel rows are
display-only and never link.
A nav row with nested items shows them, as before. Setting expanded
makes it a disclosure:
expanded: true: children shown, a down chevron,aria-expanded="true" data-wf-expanded.expanded: false: children hidden, a right chevron,aria-expanded="false".
Without expanded, the row has no chevron and no aria-expanded.
A horizontal site menu (wf-nav-top):
- A top-level item without children is a link, like a sidebar row.
- A top-level item with nested
items, or atype: group, is a disclosure<button>with a down chevron andaria-expanded. Its ownrouteis not used. opennames the item whose panel is drawn, byvalueorlabel. Without a match, the first item withexpanded: trueopens. Only one panel is open.- The panel (
wf-nav-panel) hangs below its trigger, out of the layout flow, so give the region room for it. Each entry is a link with an icon box, the label and adescriptionline. Headings, groups and separators work inside the panel. - Separators at the top level are short vertical rules.
- nav:
variant: top
open: Products
items:
- label: Products
items:
- { label: Analytics, icon: chart-line, description: Dashboards and reports, route: analytics }
- { label: Automation, icon: bolt, description: Scheduled workflows, route: automation }
- { label: Pricing, route: pricing }A desktop application menu row (wf-menubar). At the top level it is a menu
strip (Navigation kinds); in a framed bar it is bare:
- A top-level item with nested
itemsis a<button class="wf-menubar-trigger">disclosure witharia-expanded. Its ownrouteis not used. - A top-level item without
itemsis a page link in the bar, throughitemLinkas a nav row:<a class="wf-menubar-trigger" href>when its route is known, focusable and followed on Enter. With an unknown or missing route, whendisabled, or when the menubar has its owninteraction, it is a<span>that takes no focus. Write a plain link this way, never as a title whose one-item menu repeats its name. - Which titles are current follows nav's rule: an item's own
selectedorcurrentdecides first, and every marked item is on. Otherwise an enabled title without a menu whoserouteis the page being rendered is current. An item markedfalseis never inferred. Current titles getaria-current="page", ink, weight 600 and a 2px underline; an open (expanded) menu keeps its fill (card) or dashed outline (line), so the two never look alike. Mark the page withcurrent, notopen. opennames the menu drawn open, byvalueorlabel; without a match, the first item withexpanded: trueopens. The panel (wf-menubar-panel) hangs below its trigger, out of the layout flow.- Panel rows draw the icon, label and
shortcutas key chips. A row with nesteditemsshows a right chevron; its submenu is not drawn. - Rows support
separator,headingandgroupentries, plusdisabled,selectedandcurrent.
- menubar:
open: Edit
items:
- { label: File, items: [New, Open] }
- label: Edit
items:
- { label: Undo, shortcut: "⌘Z" }
- { type: separator }
- { label: Find, items: [Find…, Replace…] }A display-only command palette (wf-command). Its frame follows the frame
rules (C): a box on its own, unframed inside a card or modal.
- The search row shows
queryin ink, orplaceholdermuted. With neither, it shows a skeleton bar. itemsare rows withicon,label,descriptionandshortcut. Consecutive rows form one list; agroupis its heading plus its own list.headingandseparatorentries draw on their own.selectedhighlights a row. A row with a knownrouteis a link.- With no rows,
emptyis shown (default "No results found."). footer: trueadds a key-hint bar: ↑ ↓ Navigate, ↵ Open, esc Close.
Lists are plain <ul> elements; there are no listbox or option roles.
- command:
placeholder: Search or run a command
footer: true
items:
- type: group
label: Suggestions
items:
- { label: New project, icon: plus, shortcut: "⌘N", selected: true }
- { label: Settings, icon: gear, description: Workspace preferences, route: settings }command rows and menubar panel rows draw shortcut as <kbd class="wf-kbd">
chips inside <span class="wf-keys">. menu keeps its plain shortcut text.
- A list (
[⌘, K]) is one chip per entry. - A string splits on spaces and on
+between keys:Ctrl+Kis Ctrl, K andG Dis G, D. - Leading modifier glyphs (⌘ ⇧ ⌥ ⌃) become chips of their own:
⌘⇧Pis ⌘, ⇧, P, and⌘+is ⌘, +.
Line mode draws chips square with a dark outline.
action_sheet items use the menu profile. {divider: true} and
type: separator now draw a gap between row groups instead of a blank row; a
heading or group label is a small centred caption; disabled rows are
native disabled buttons. Item routes are not used.