Nav and top bar
The four pages of the app: Dashboard, Profiles, History, Settings. A sidebar on desktop, a menu behind the top bar on smaller screens.
HTML
<div class="bm-stage">
<aside class="bm-tile" style="width:248px;height:332px;gap:0;padding:var(--space-4) var(--space-3)">
<div style="padding:var(--space-2) var(--space-2) var(--space-5)"><img class="bm-wm bm-wm--light" src="/design/logos/bettermate-wordmark.svg" alt="BetterMate"><img class="bm-wm bm-wm--dark" src="/design/logos/bettermate-wordmark-inverse.svg" alt="BetterMate"></div>
<nav class="bm-nav" aria-label="Pages">
<a class="bm-nav__item" aria-current="page" href="#"><span data-icon="house"></span>Dashboard</a>
<a class="bm-nav__item is-hover" href="#"><span data-icon="list"></span>Profiles</a>
<a class="bm-nav__item" href="#"><span data-icon="history"></span>History</a>
<a class="bm-nav__item" href="#"><span data-icon="settings"></span>Settings</a>
</nav>
<p class="bm-help" style="margin-top:auto;padding:0 var(--space-2)">Based on <a class="bm-link bm-link--inline" href="#">GaggiMate</a></p>
</aside>
<div class="bm-stack" style="width:320px">
<span class="bm-eyebrow">Top bar, with a warning</span>
<div class="bm-topbar"><button class="bm-btn bm-btn--icon bm-btn--quiet" aria-label="Menu"><span data-icon="menu"></span></button><span><img class="bm-wm bm-wm--light" src="/design/logos/bettermate-wordmark.svg" alt="BetterMate"><img class="bm-wm bm-wm--dark" src="/design/logos/bettermate-wordmark-inverse.svg" alt="BetterMate"></span><button class="bm-btn bm-btn--icon bm-btn--quiet" aria-label="1 warning" style="color:var(--warning)"><span data-icon="triangle-alert"></span></button></div>
<span class="bm-eyebrow">Top bar, all normal</span>
<div class="bm-topbar"><button class="bm-btn bm-btn--icon bm-btn--quiet" aria-label="Menu"><span data-icon="menu"></span></button><span><img class="bm-wm bm-wm--light" src="/design/logos/bettermate-wordmark.svg" alt="BetterMate"><img class="bm-wm bm-wm--dark" src="/design/logos/bettermate-wordmark-inverse.svg" alt="BetterMate"></span><span style="width:var(--control-md)"></span></div>
</div>
</div>- From 1024 px the Nav is a sidebar tile,
sidebar248 px wide: the wordmark, the four pages, and the GaggiMate credit at the bottom. - Below 1024 px the top bar holds a menu button, the wordmark, and a
triangle-alertbutton inwarningonly when a warning exists. The menu button opens the same list as a sheet. - Nouns, one word each, always with their icon. The order never changes.
Anatomy
nav.bm-nav holds a.bm-nav__item rows: 44 px tall, radius-md, a 24 px icon and the page name in body at weight 500, space-3 apart, with space-1 between rows. .bm-topbar is 44 px tall with icon buttons (bm-btn--icon bm-btn--quiet) at each end and the wordmark at 20 px between them.
States
| State | Fill | Icon and word |
|---|---|---|
| Rest | none | ink-muted |
| Hover, pressed | state-hover | ink |
| Current page | surface-2 | ink |
| Focus | the focus ring |
The current page is a tone step, not an ink fill: ink is kept for the machine's mode and for chosen settings, so the two never compete on one screen.
Content
Page names are fixed: Dashboard, Profiles, History, Settings. A fifth page needs a reason and a place in this list before it gets a row. The credit reads "Based on GaggiMate", with GaggiMate as an underlined link.
Keyboard and screen reader
navwitharia-label="Pages"; the current row hasaria-current="page".- Put a "Skip to content" link first in the page, visible on focus, so the sidebar can be passed in one key.
- The top bar's buttons are named "Menu" and "1 warning" (with the count). The warning button opens the warnings list; it is absent, not disabled, when there is none.
- The wordmark image has
alt="BetterMate"and links to the Dashboard.