Appearance
Navigation chrome
The fixed navigation around every page: the nav rail, the page header's breadcrumb and the record stepper.
navigation-navrail--closedOpen in Storybook ↗When to use
- The nav rail is on every page; its items come from the tenant's main menu.
- The breadcrumb and record stepper sit in the page header and fill themselves from where people came from.
When not to use
- Switching views within a page: use tabs or a toggle group.
- Actions on the page or record: put them in the header's split button or overflow menu, not in the rail.
Anatomy
Nav rail
- Top: the logo (
--nav-rail-logo, links home), an environment chip outside production, and the mode button that keeps the menu open or collapses it. - Items: an icon per item (
--nav-rail-item-widthby--nav-rail-item-height,--nav-rail-item-radius), an optional count badge, and the label once the menu is open. A group has sub-items. - Account: the user as a circle with their initials (
--nav-rail-avatar-size) and Log out; Log in when signed out.
Closed, the rail is --nav-rail-width wide. Kept open it is --nav-flyout-width wide and the page moves aside by the same width, so nothing is covered.
Page header
- Breadcrumb: grey pill capsules (
--crumb-pad,--radius-pill) joined by a light ›. With more than one earlier page, a counted … capsule opens the list of earlier pages. The previous page is a link; the current page ends the trail, unlinked and never cut off, after its type badge when it has one. - Record stepper: ‹ 3 of 128 › in one capsule (
--stepper-pad), with ghost icon buttons (--stepper-button-size). It shows on a record opened from a list and steps through that list. - Header extras: the language dropdown, the tenant dropdown where tenants are on, and the search.
Variants
| Variant | Where | Behaviour |
|---|---|---|
| Closed rail | default from 48rem up | icons only; the label shows in a tooltip at once; a group opens a flyout beside its icon |
| Open rail | after Keep menu open | icons with labels; groups open inline under their row |
| Top bar and drawer | below 48rem | a top bar (--mobile-top-bar-height) with a menu button, logo and search; the menu opens as a --nav-drawer-width drawer over a dimmed page |
navigation-navrail--openOpen in Storybook ↗navigation-navrail--mobile-drawerOpen in Storybook ↗The mode is remembered per browser. In the drawer, the language and tenant dropdowns sit above the account rows, and a dot on the menu button shows when an item has a badge.
A group's flyout (--menu-padding, at least --menu-min-width) lists the group name as a small title and the sub-items below it. When the group has a page of its own, the title links to it. It closes on Escape, a click outside, picking a sub-item or navigating.
States
| State | What you see | Trigger |
|---|---|---|
| Resting | muted icon and label | — |
| Hover | --color-accent-highlight fill | pointer |
| Current | --color-accent-light fill, --color-accent-ink | the current page; a group is current when one of its sub-items is |
| Group open | chevron down (open rail) or flyout (closed rail) | clicking the group |
| Badge | count after the label, or on the icon's corner when closed; 99+ above 99 | the item has new things |
| Stepper at an end | that arrow disabled | first or last record of the list |
| Earlier pages | list of earlier pages under the … capsule | clicking the capsule |
components-breadcrumb--history-openOpen in Storybook ↗Only one group is open at a time. Clicking a group with a page of its own in the open rail also goes to that page.
Keyboard & accessibility
- The rail is a
<nav>named Main navigation. Items are links witharia-current="page"on the current one; items that open a form are buttons. - Groups are disclosure buttons with
aria-expandedandaria-controls. The flyout holds plain links, so Tab moves through them in order. Escape closes it and returns focus to the group. - Closed, each item keeps its label as hidden text, so its name is the label plus the badge count.
- The mode button is named after what it does: Keep menu open or Collapse menu.
- In the drawer, focus moves to the close button on open and back to the menu button on close. Escape closes the drawer. The page behind it, and the closed drawer, are
inert. - The breadcrumb is a
<nav>named Breadcrumb; the current page hasaria-current="page". The … capsule is a button witharia-expanded, named Earlier pages. - The stepper is a group named Position in the result list. Its arrows are named Open previous and Open next, and Alt + ← or → steps outside text fields. The position is
role="status".
Content
- Menu labels are short nouns for the destination: Library, Media.
- The stepper reads {index} of {total}.
- Translation keys:
navigation.*andentity-navigation.*.
Related
Tooltip · Dropdown · Overflow menu · Chip & badge · Accessibility