Menu


App bar


The top bar of an application: brand, navigation links, then search, action buttons, the theme switch and the user, in five looks; the links fold into a menu when they do not fit.

Customize the preview


Choices
Show
Flags
View

Options


App bar options
ChoiceValuesDefaultWhat it does
looksmbk-app-bar--look-<value>floatingfloating-hugflatsplitcentredfloating
Floating: a raised bar with rounded corners and a hairline edge, the links in the true middle. Floating hug: the same bar only as wide as its content, centered. Flat: a square bar with no edge or shadow, a line along its foot. Split: the brand on an island of its own at the start, the links and the end group on one at the end. Centred: the links at the start, the brand in the middle. Figma calls this Style.
sizesmbk-app-bar--size-<value>mdlgmd
How large the links in the wide bar are. md is Figma's: the middle navigation item. lg is the large item, as the bar drew them before. The menu keeps its large items either way.
backgroundsmbk-app-bar--background-<value>onoffon
The bar's own surface. Off drops its fill, edge and shadow so it sits on whatever is behind it; the open menu keeps its surface, as Figma draws the open bar only with one, and a bar that hides on scroll takes the page's own surface while it sticks. Figma: Background (on by default).
linesmbk-app-bar--line-<value>onoffon
The hairline along the foot of a flat bar. Only the flat look draws it. Figma: Line (on by default).
logosmbk-app-bar--logo-<value>onoffon
The brand at the start of the bar in a wide space. Off drops it, for a page whose logo sits elsewhere, such as at the top of a sidebar that runs the page's full height; the links then start the bar, and a badge stays. The narrow bar keeps its logo either way.
linkssmbk-app-bar--links-<value>betweenstartendbetween
Where the links sit in a wide space. Between: in the middle of the bar, as Figma draws it. Start: right after the brand, the free room after them, as the Showroom App bar draws them. End: pushed to the end, just before the search, buttons and theme switch, for a bar laid over a page whose middle is its own, such as a home page with a large picture behind it. Start and end are not in the App bar component in Figma. The menu is the same either way.
nav-typesmbk-app-bar--nav-type-<value>linkstabslinks
How the wide bar draws its links. Links: navigation items. Tabs: small line tabs that fill the bar's whole height, the current page's underline on the bar's foot; the bar is then 64 tall. Either way they are links, the current one marked as the current page, and the menu lists them as navigation items. Figma: AppBarNav's Type.
foldsmbk-app-bar--fold-<value>noneactionslinksnone
What has folded away in a wide space too narrow for the whole row. Actions: the action buttons are gone. Links: the actions and the links are gone and the menu button shows, opening the links under the bar. The wrapper measures the row and sets it; markup written by hand sets it the same way.
expandedsmbk-app-bar--expandedOn or offOff
The menu is open under the bar: in a narrow space, or in a wide one whose links have folded away.
hide-on-scrollsmbk-app-bar--hide-on-scrollOn or offOff
In a narrow space, the bar stays at the top of the window while the page scrolls, slides up out of sight as the reader scrolls down and comes back as they scroll up. For a page that scrolls the window; turned on page by page. Has no effect in a wide space. Not in Figma.
scrolled-awaysmbk-app-bar--scrolled-awayOn or offOff
The bar has slid up out of sight. The wrapper sets it while the reader scrolls down a page with hide on scroll on; plain markup sets it the same way. Has no effect without hide on scroll or in a wide space.
zonesmbk-app-bar--zoneOn or offOff
The bar's own room, as Figma draws it: the medium inset above and below a floating bar and a step in from the sides, and its row held to the content width. Off by default, so a page that already leaves room around its bar keeps its own.
sidebar-startsmbk-app-bar--sidebar-startOn or offOff
In a wide space the start is as wide as the expanded sidebar, its logo the sidebar's logo size and in line with the sidebar's rows, so links that follow it (links start) begin where the page beside a sidebar begins. For a bar across the top of a page with a sidebar under it at the same side gutter as the bar's own inset. Not in the App bar component in Figma; drawn in the Showroom App bar.
frostedsmbk-app-bar--frostedOn or offOff
A blur behind the bar, strongest at the top and gone by its foot, so what scrolls under it is never read sharply there. For a bar with its background off, or with its own room. Not drawn when the system asks for forced colors.

Partssmbk-app-bar__panelsmbk-app-bar__frostsmbk-app-bar__barsmbk-app-bar__startsmbk-app-bar__brandsmbk-app-bar__logosmbk-app-bar__badgesmbk-app-bar__titlesmbk-app-bar__trailsmbk-app-bar__navsmbk-app-bar__endsmbk-app-bar__searchsmbk-app-bar__actionssmbk-app-bar__dividersmbk-app-bar__menu-buttonsmbk-app-bar__second-rowsmbk-app-bar__second-row-navsmbk-app-bar__menusmbk-app-bar__menu-endsmbk-app-bar__wide-onlysmbk-app-bar__narrow-only

Examples


Usage

Brand, links in the middle, then action buttons, the theme switch and the user, in a wide space.

Without background

The bar without its own surface, edge or shadow, sitting on what is behind it.

Guidelines


Purpose

The bar across the top of an application screen: the brand, the main links, and at the end a search field, a couple of action buttons, the theme switch and the signed-in user. It is for a product someone is working in. The header is its cousin for a marketing or documentation site; the two share their looks and their parts.

When to use

  • The top of every screen of an application.

When not to use

  • A website. Use the header, which has the same looks.
  • Inside a page. It is page chrome, not content.

Usage rules

Do

  • Give the user slot a way to sign out.
  • Keep the links to the few that matter most; the same list fills the menu.
  • Give every link an icon, or none.
  • Turn on the bar's own room only where the page leaves none around it, so the space is never doubled.

Don't

  • Put more than two or three action buttons in it. Move the rest behind a menu.
  • Rely on the action buttons in a narrow space or a crowded wide one: they fold away, so anything they do must be reachable elsewhere too.
Do

Keep two or three action buttons in the bar and move the rest behind a menu, so the bar stays calm.

Don't

A row of six icon buttons is hard to tell apart and crowds out the links.

Anatomy

  • The block, a raised bar with a hairline edge. With the background off it has no fill, edge or shadow and sits on the page behind it; the open menu keeps its surface.
  • Five looks: floating (the default), floating hug (only as wide as its content, centered), flat (square, no edge or shadow, a hairline along its foot that the line setting turns off), split (the start on an island of its own, the links and the end on another) and centred (the links at the start, the brand in the middle).
  • The panel part: the bar's surface when the bar has its own room or a frost; otherwise it is no box and the block draws the surface.
  • The bar part, the row: the start part (the brand part with the logo part, then an optional badge part), the trail part holding the nav part (navigation items with their icons and any count or dot, the same links drawn as line tabs, or other content in their place) and the end part (the search part, the actions part, the theme switch and the user; a search button, in a narrow space, or in a wide one with no search field; and in a narrow space or once the links have folded the menu button part).
  • The logo part is the built-in simbolik logo, or a site's own picture files with their dark versions (logoPicture, the logo's picture): the whole logo in a wide space and the mark in a narrow one. Anything else goes in the brand's place (brand), or in the whole start's place (start), such as a back button and a title part.
  • The second row part, under the bar: a divider and the second row nav part, a row a control tall for further navigation such as line tabs.
  • The menu part, under the bar when expanded: the links as large navigation items each filling its row, and in a narrow space the theme switch at the end.
  • The frost parts, three layers behind the bar when frosted.

Behavior

One markup serves both forms. In a wide space the links sit in the true middle of the bar: the start and the end share what the links leave equally, and where there is too little room each end keeps what it holds and the links move off the middle rather than overlap. Set to the start, the links follow the start and the free room comes after them. Set to the end, the links sit against the end group. An end group holding a search field keeps the same room on either side of the links instead, and there the search field narrows first. In a narrow space the links, the search field and the action buttons are removed and replaced by a search button and a menu button, and the menu button stacks the links under the bar. The form follows the layout switch, so a wrapper can force either. The menu state can be controlled from outside or left to the bar. Escape closes the open menu and puts focus back on the menu button. The menu grows open under the bar with the enter motion and closes a little faster with the exit motion; under reduced motion it opens and closes at once.

In a wide space too narrow for the whole row, the bar folds parts away rather than cutting them off: first the action buttons, then the links, whose place the menu button takes; it opens them under the bar. The bar measures its own row whenever its size or content changes and once the fonts have loaded, and keeps the least folded form that fits, so the links come back as soon as there is room. Only links fold: content passed in their place stays. Before the page's script runs the row clips what it cannot hold, so the page never scrolls sideways. fold={false} keeps every part in the row; a stage ("actions", "links") holds the bar there. Markup written by hand sets the fold modifier itself.

The bar can have its own room (zone): the medium inset above and below a floating bar and a step in from the sides, a smaller one in a narrow space, and none around a flat bar; past the content width its row stays that wide and centered while the surface runs on. It is off by default, so a page that already leaves room around its bar keeps its own. A frosted bar has a blur behind it, strongest at the top and gone by its foot, so what scrolls under it is never read sharply there; it shows where the bar has no background of its own, or in its room, and is not drawn when the system asks for forced colors.

The links can be drawn as tabs (nav-type="tabs"): small line tabs that fill the wide bar's whole height, the current page's brand underline lying on the bar's foot, the bar then 64 tall. They are still links, the current page marked, and the menu lists them as navigation items as before. Over a page with a sidebar under the bar, the start can be as wide as the expanded sidebar (sidebar-start), its logo the sidebar's logo size and in line with the sidebar's rows, so links set to the start begin at the sidebar's edge. That lines up when the bar's side inset is the page's gutter, as a flat bar's across a page with the medium inset gutter is. Both change the wide bar only.

The logo can be turned off for the wide bar, for a page whose logo sits elsewhere, such as at the top of a sidebar that runs the page's full height: the links then start the bar, a badge stays, and the end group keeps its place. The narrow bar keeps its logo whatever the setting, because there the page's other logo is usually gone with its sidebar.

A page that scrolls the window can turn on hide on scroll, page by page. In a narrow space the bar then stays at the top of the window while the page scrolls under it, slides up out of sight as the reader scrolls down, and comes back as soon as they scroll up, so the menu and search are never more than a small scroll away. It ignores moves of a few pixels, stays while the page is still within the bar's own height of the top, never hides while one of its menus is open or keyboard focus is inside it, and comes back the moment keyboard focus moves into it. It slides away with the exit motion and back with the enter motion; under reduced motion it hides and shows at once. A flat bar sticks flush with the window's top, and a bar with its background off takes the page's own surface while it sticks, still with no edge or shadow, so nothing shows through it. While such a bar is on the page, the window keeps the bar's room clear at its top whenever it scrolls to bring something into view, a link reached with Tab or a heading jumped to, so nothing lands under the bar. A wide space keeps the bar as it is. A page that is one screen by design, such as a home page, leaves it off.

A page can take the menu over (onMenu): the menu button then calls the page instead of opening the bar's own menu, and the bar draws no menu, so the page opens its own, such as a drawer holding the links and more. The button then says it opens a dialog rather than that it is expanded. On a phone, for example, a drawer can hold the site's sections and its whole category tree, with the theme switch in the drawer's foot.

Hide on scroll needs the bar to stick to the top of the window, and a sticking element cannot leave the element around it. Place the bar straight in the page's column, or give a wrapper that holds only the bar display: contents in a narrow space.

Accessibility


What it does for you

  • The bar is a banner landmark. The links in the bar are a navigation landmark named "Main" by default, and the menu links one named "Menu". Drawn as tabs they are the same links in the same navigation, never a tab list.
  • A link's count and dot are part of its name, after a pause: "Issues, 18".
  • The current page's link carries the current-page marker, and its label is a weight step bolder as well as filled.
  • The menu button carries its expanded state and names the menu it controls; the search button is named "Search". Escape closes the open menu and returns focus to the menu button.
  • Parts hidden by the layout switch or folded away are removed from the tab order, so nothing is reachable that cannot be seen.
  • A badge after the brand is read after it.
  • In the centred look the brand is still first in reading and Tab order, before the links that are drawn to its left.
  • A bar that has scrolled out of sight comes back the moment keyboard focus moves into it, and stays while focus is inside it, so a keyboard user never works in a bar they cannot see.

What you must do

  • Give the links another name when a page has more than one bar.
  • Put something with an accessible name in the user slot, for example an avatar with the person's name.
  • Give the words the bar says by itself, such as the menu button's and the search button's names, in the page's own language. They keep their English unless the page gives its own.

How to test

  • Tab through the bar: focus moves in the order it is read, the focus ring shows in both themes and in a forced-color mode, and nothing hidden takes focus.
  • Open the menu with Enter or Space, then press Escape: it closes and focus is back on the menu button.
  • With a screen reader, the bar is read as a banner with a "Main" navigation, the current page is announced as current, and a link's count is read after its label.
  • With text at 200% and the page 320 pixels wide, the bar folds to its menu and every link stays reachable.
  • On a page that scrolls, scroll the bar out of sight, then Tab into it: it comes back.

Keyboard

App bar keys
KeyWhat it does
Tab
Moves focus through the visible links and buttons in reading order.
Shift+Tab
Moves focus back through them.
Enter
Follows a link, or presses the menu button or the search button.
Space
Presses the menu button or the search button.
Escape
Closes the open menu and returns focus to the menu button.

Source


The files the app bar is made of. Its folder on GitHub (opens in a new tab) holds them with its wrapper and its document.

Stylesheet
app-bar.css
/* smbk-app-bar — App bar. Figma "App bar" 7353:700 (Style × Platform × State), built from AppBarStart,
 * AppBarNav and AppBarEnd.
 * The top bar of an application: the start (the brand and a badge), the links in the middle, then at the end
 * the search field, action buttons, the theme switch and the user. In a narrow space the links, search and
 * actions give way to a search button and a menu button, and the menu button opens a stacked list under the
 * bar. Which form shows is the layout switch, never a width written here. In a wide space too narrow for the
 * whole row the wrapper folds the actions away, then the links, and the menu button opens them (fold).
 *
 * What the app bar shares with the header, which is built from the same parts, is written once in
 * ../bar/bar.css: the bar and its surface, the five looks, the zone, the frost, the second row, the row's common
 * arrangement and the open menu's movement. This stylesheet keeps what is the app bar's own. */

.smbk-app-bar__second-row {
  padding: 0 calc(var(--smbk-space-inset-md) - var(--smbk-border-width-hairline)) calc(var(--smbk-space-inset-md) - var(--smbk-border-width-hairline));
}

.smbk-app-bar--look-split .smbk-app-bar__second-row {
  padding: calc(var(--smbk-space-inset-md) - var(--smbk-border-width-hairline));
}

/* ==== The app bar's own row ==== */

/* Figma draws the bar's edge inside it (56 tall with a medium control between two medium insets), so each padding
   here gives the edge's width back; the same in the narrow bar and its menu. The row clips what it cannot hold
   until the page's script has measured it, so the page never scrolls sideways. */
.smbk-app-bar__bar {
  display: flex;
  justify-content: space-between;
  gap: var(--smbk-space-inline-lg);
  padding: calc(var(--smbk-space-inset-md) - var(--smbk-border-width-hairline));
}

/* The links sit in the true middle, as Figma draws them: the start and the end share what the links leave
   equally; where there is too little room each end keeps what its content needs and the links move off the middle
   rather than overlap. An end group holding a search field keeps the bar's room on either side of the links
   instead, because there the search field narrows first. Markup without a start part keeps the room on either
   side too. */
.smbk-app-bar__start,
.smbk-app-bar__start ~ .smbk-app-bar__trail > .smbk-app-bar__end {
  flex: 1 1 0;
}

.smbk-app-bar__bar:has(.smbk-app-bar__search) > .smbk-app-bar__start {
  flex: 0 0 auto;
}

.smbk-app-bar__badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* A title in the bar, after a back button at the start or alone in the middle, as Figma's AppBarStart Back and
   AppBarNav Title draw it: Label LG in the default text color, on one line. */
.smbk-app-bar__title {
  overflow: hidden;
  color: var(--smbk-color-text-default);
  font-family: var(--smbk-typography-label-lg-font-family);
  font-size: var(--smbk-typography-label-lg-font-size);
  font-weight: var(--smbk-typography-label-lg-font-weight);
  line-height: var(--smbk-typography-label-lg-line-height);
  letter-spacing: var(--smbk-typography-label-lg-letter-spacing);
  text-transform: var(--smbk-typography-label-lg-text-transform);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The links (their row is in bar.css) never shrink. */
.smbk-app-bar__nav {
  flex-shrink: 0;
}

/* Links at the end: the free room goes before them instead of on either side, so they sit
   against the end group, the bar's own gap apart. */
.smbk-app-bar--links-end .smbk-app-bar__nav {
  margin-inline-start: auto;
}

.smbk-app-bar--links-end .smbk-app-bar__end,
.smbk-app-bar--links-end .smbk-app-bar__start ~ .smbk-app-bar__trail > .smbk-app-bar__end {
  flex: 0 1 auto;
}

/* Everything after the links, the small inline step apart. When space runs short, the search field is what gives;
   what still does not fit runs on past the end, where the bar clips it and its script sees it to fold, never back
   over the logo (safe). */
.smbk-app-bar__end {
  justify-content: safe flex-end;
  flex: 0 1 auto;
  min-width: 0;
}

/* Beside the links in the true middle, the end group keeps all it holds; it narrows only once everything that can
   fold has folded. */
.smbk-app-bar__start ~ .smbk-app-bar__trail > .smbk-app-bar__end {
  min-width: auto;
}

.smbk-app-bar__bar:has(.smbk-app-bar__search) .smbk-app-bar__end,
.smbk-app-bar--fold-links .smbk-app-bar__end {
  flex: 0 1 auto;
  min-width: 0;
}

.smbk-app-bar__search {
  flex: 0 1 auto;
  width: var(--smbk-size-search-width);
  min-width: 0;
  /* Narrowed past its icon and hint, it keeps them inside its own sides rather than over its neighbours; its
     shadow still shows below it. */
  overflow-x: clip;
}

.smbk-app-bar__actions {
  display: flex;
  align-items: center;
  gap: var(--smbk-space-inline-sm);
  flex-shrink: 0;
}

.smbk-app-bar__end > :not(.smbk-app-bar__search) {
  flex-shrink: 0;
}

.smbk-app-bar__divider {
  height: var(--smbk-size-control-md);
}

/* The open menu, as Figma's open mobile app bar draws it: the links with their icons, each row a medium control
   tall and the extra-small stack step apart, then the theme switch at the end; the medium inset at the sides and
   above the menu's foot, no dividers. */
.smbk-app-bar__menu {
  gap: var(--smbk-space-stack-xs);
  padding: 0 calc(var(--smbk-space-inset-md) - var(--smbk-border-width-hairline));
}

.smbk-app-bar__menu nav {
  display: flex;
  flex-direction: column;
  gap: var(--smbk-space-stack-xs);
}

/* The theme switch at the menu's end shows only in the narrow form, where the bar has none of its own. */
.smbk-app-bar__menu-end {
  display: none;
  justify-content: flex-end;
}

/* ---- the looks' rows ---- */

/* Floating hug: none of the three places grows. */
.smbk-app-bar--look-floating-hug .smbk-app-bar__start,
.smbk-app-bar--look-floating-hug .smbk-app-bar__start ~ .smbk-app-bar__trail > .smbk-app-bar__end {
  flex: 0 0 auto;
}

/* Split: each island has the bar's padding. */
.smbk-app-bar--look-split .smbk-app-bar__start,
.smbk-app-bar--look-split .smbk-app-bar__trail {
  flex: 0 0 auto;
  padding: calc(var(--smbk-space-inset-md) - var(--smbk-border-width-hairline));
}

.smbk-app-bar--look-split .smbk-app-bar__start ~ .smbk-app-bar__trail > .smbk-app-bar__end {
  flex: 0 1 auto;
}

/* Centred: the links at the start, the brand in the middle, the end at the end. */
.smbk-app-bar--look-centred .smbk-app-bar__nav {
  order: 1;
  flex: 1 1 0;
}

.smbk-app-bar--look-centred .smbk-app-bar__start {
  order: 2;
  flex: 0 0 auto;
}

.smbk-app-bar--look-centred .smbk-app-bar__end {
  order: 3;
}

/* ---- fold: in a wide space too narrow for the whole row, the actions go first, then the links, and the menu
   button takes their place, opening the links under the bar. The wrapper measures and sets it. The selectors
   carry the block so they outweigh the narrow form's rules for the menu button. ---- */

.smbk-app-bar--fold-actions .smbk-app-bar__actions,
.smbk-app-bar--fold-links .smbk-app-bar__actions,
.smbk-app-bar--fold-links .smbk-app-bar__nav {
  display: none;
}

/* ---- the two forms (the shared parts are in bar.css): the open menu's foot padding after a fold. ---- */

.smbk-app-bar--fold-links.smbk-app-bar--expanded .smbk-app-bar__menu {
  padding-bottom: calc(var(--smbk-space-inset-md) - var(--smbk-border-width-hairline));
}

/* Logo off: the wide bar starts with its links and keeps its end group at the end, even with no
   links; a badge stays at the start. The narrow bar keeps its logo. */
.smbk-app-bar--logo-off .smbk-app-bar__brand,
.smbk-app-bar--logo-off .smbk-app-bar__start:not(:has(.smbk-app-bar__badge)) {
  display: none;
}

.smbk-app-bar--logo-off .smbk-app-bar__start {
  flex: 0 0 auto;
}

.smbk-app-bar--logo-off .smbk-app-bar__end {
  margin-inline-start: auto;
}

@container style(--smbk-layout: narrow) {
  .smbk-app-bar--logo-off .smbk-app-bar__brand {
    display: inline-flex;
  }

  .smbk-app-bar--logo-off .smbk-app-bar__start:not(:has(.smbk-app-bar__badge)) {
    display: flex;
  }
}

/* ---- the wide bar's arrangements from the Showroom App bar (Figma 8061:17018). Each is wide only: the narrow bar
   keeps its own form. ---- */

@container style(--smbk-layout: wide) {
  /* Links start: the links right after the start and the free room after them, the start keeping only its own
     width rather than sharing the room with the end. */
  .smbk-app-bar--links-start .smbk-app-bar__start {
    flex: 0 0 auto;
  }

  .smbk-app-bar--links-start .smbk-app-bar__nav {
    margin-inline-end: auto;
  }

  /* Sidebar start: the start and the bar's gap after it as wide as the expanded sidebar, so the links begin at the
     sidebar's edge; the logo a medium inset in, where the sidebar's rows begin, at the sidebar's own logo size. It
     lines up when the bar's side inset is the page's gutter, as a flat bar's across a page with a medium inset
     gutter is. */
  .smbk-app-bar--sidebar-start .smbk-app-bar__start {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: calc(var(--smbk-size-sidebar-width) - var(--smbk-space-inline-lg));
    padding-inline-start: var(--smbk-space-inset-md);
  }

  .smbk-app-bar--sidebar-start .smbk-app-bar__logo {
    height: var(--smbk-size-icon-lg);
  }

  /* Nav type tabs: the links are small line tabs filling the bar's whole height, 64 with its edge, with no padding
     above or below. The tabs reach over the bar's edge, so the current page's underline lies on the bar's foot line,
     as Figma draws it; the bar's foot is their line, so the tabs draw none of their own. */
  .smbk-app-bar--nav-type-tabs .smbk-app-bar__bar {
    height: calc(var(--smbk-size-64) - 2 * var(--smbk-border-width-hairline));
    padding-block: 0;
  }

  .smbk-app-bar--nav-type-tabs .smbk-app-bar__nav.smbk-tabs {
    align-self: stretch;
    align-items: stretch;
    margin-block: calc(-1 * var(--smbk-border-width-hairline));
  }

  .smbk-app-bar--nav-type-tabs .smbk-app-bar__nav.smbk-tabs > .smbk-tabs__list {
    height: auto;
    box-shadow: none;
  }
}

/* The narrow bar as Figma draws it: the medium inset all round, the row a medium control tall, the brand and the
   end group at its two ends. */
@container style(--smbk-layout: narrow) {
  .smbk-app-bar__bar {
    padding: calc(var(--smbk-space-inset-md) - var(--smbk-border-width-hairline));
  }

  .smbk-app-bar__menu-end {
    display: flex;
  }

  .smbk-app-bar--expanded .smbk-app-bar__menu {
    padding-bottom: calc(var(--smbk-space-inset-md) - var(--smbk-border-width-hairline));
  }

  /* Floating hug: the places share the row. */
  .smbk-app-bar--look-floating-hug .smbk-app-bar__start,
  .smbk-app-bar--look-floating-hug .smbk-app-bar__start ~ .smbk-app-bar__trail > .smbk-app-bar__end {
    flex: 1 1 0;
  }

}

/* ---- hide on scroll: in a narrow space, a bar with the flag on stays at the top of the window, the
   medium inset from its edge (the room a page leaves around its bar), over the page as it scrolls under it.
   The wrapper marks it scrolled away while the reader scrolls down: it slides up past the window's edge,
   by the gap above it and a large inset more so its shadow goes too, with the exit motion, and comes back
   with the enter motion. It sticks inside the element around it, so that element must run the page's
   length. At once under reduced motion. A wide space, where the page scrolls an inner area, keeps the
   bar as it is. ---- */

@container style(--smbk-layout: narrow) {
  .smbk-app-bar--hide-on-scroll {
    position: sticky;
    top: var(--smbk-space-inset-md);
    z-index: var(--smbk-layer-sticky);
    transition: translate var(--smbk-motion-enter-duration) var(--smbk-motion-enter-easing);
  }

  .smbk-app-bar--hide-on-scroll.smbk-app-bar--scrolled-away {
    translate: 0 calc(-100% - var(--smbk-space-inset-md) - var(--smbk-space-inset-lg));
    transition-duration: var(--smbk-motion-exit-duration);
    transition-timing-function: var(--smbk-motion-exit-easing);
  }

  /* A flat bar runs edge to edge, so it sticks flush with the window's top, with no room above it. */
  .smbk-app-bar--hide-on-scroll.smbk-app-bar--look-flat {
    top: 0;
  }

  /* With its background off, a bar that sticks takes the page's own surface, still with no edge or shadow, so it
     looks as it does at rest on the page while the page scrolls under it, and nothing shows through it. */
  .smbk-app-bar--hide-on-scroll.smbk-app-bar--background-off:not(.smbk-app-bar--expanded) {
    background: var(--smbk-color-surface-canvas);
  }
}

@media (prefers-reduced-motion: reduce) {
  .smbk-app-bar--hide-on-scroll {
    transition: none;
  }
}

/* While a page holds a bar that sticks, the window keeps the bar's room clear at its top whenever it
   scrolls to bring something into view: a focused link, or a heading jumped to from a link to it. So
   nothing lands under the bar. The room is the header height and the gap above the bar. In a wide
   space, where the bar does not stick, the window keeps the same room, which only moves a jumped-to
   heading a little further down. */
:root:has(.smbk-app-bar--hide-on-scroll) {
  scroll-padding-block-start: calc(var(--smbk-size-header-height) + var(--smbk-space-inset-md));
}

/* The open menu starts from no height and no foot padding, so both grow (the movement is in bar.css). It comes
   after the foot padding it replaces, which the starting style only overrides when it is the later rule. */
@starting-style {
  .smbk-app-bar--expanded .smbk-app-bar__menu {
    block-size: 0;
    padding-bottom: 0;
  }
}
Tokens it reads
App bar tokens
Token and CSSValuePreviewFoundation
border-width.hairline--smbk-border-width-hairline1pxBorder width
color.border.rim--smbk-color-border-rimlight: #ffffffe6dark: #ffffff0dchanges with themeColor
radius.container.sm--smbk-radius-container-sm8pxRadius
color.surface.default--smbk-color-surface-defaultlight: #f3f5f8dark: #181a1cchanges with themeColor
color.text.default--smbk-color-text-defaultlight: #232527dark: #e7ebf0changes with themeColor
elevation.raised--smbk-elevation-raisedlight: 0px 2px 8px 1px #373d431a, 0px 1px 2px 0px #373d431adark: 0px 2px 8px 1px #00000026, 0px 1px 2px 0px #00000026Elevation
motion.state.duration--smbk-motion-state-duration200msMotion
motion.state.easing--smbk-motion-state-easingcubic-bezier(0.65, 0, 0.35, 1)Motion
space.inset.md--smbk-space-inset-mdcomfortable: 8pxcompact: 6pxchanges with densitySpacing
space.inset.2xl--smbk-space-inset-2xlcomfortable: 24pxcompact: 16pxchanges with densitySpacing
space.gutter.xs--smbk-space-gutter-xscomfortable: 8pxcompact: 4pxchanges with densitySpacing
space.0--smbk-space-00pxSpacing
size.layout.container.default--smbk-size-layout-container-default1360pxSize
blur.4--smbk-blur-44pxBlur
blur.8--smbk-blur-88pxBlur
blur.14--smbk-blur-1414pxBlur
color.border.subtle--smbk-color-border-subtlelight: #c4cdd8dark: #2d3237changes with themeColor
space.stack.sm--smbk-space-stack-smcomfortable: 8pxcompact: 6pxchanges with densitySpacing
space.inline.lg--smbk-space-inline-lgcomfortable: 12pxcompact: 8pxchanges with densitySpacing
space.stack.md--smbk-space-stack-mdcomfortable: 12pxcompact: 8pxchanges with densitySpacing
space.inline.md--smbk-space-inline-mdcomfortable: 8pxcompact: 6pxchanges with densitySpacing
size.control.md--smbk-size-control-mdcomfortable: 40pxcompact: 32pxchanges with densitySize
focus.ring.width--smbk-focus-ring-width2pxFocus
color.border.focus--smbk-color-border-focuslight: #cc0d0ddark: #f34336changes with themeColor
focus.ring.offset--smbk-focus-ring-offset2pxFocus
radius.control.xs--smbk-radius-control-xs2pxRadius
size.icon.xl--smbk-size-icon-xl32pxSize
space.inline.xs--smbk-space-inline-xs4pxSpacing
space.inline.sm--smbk-space-inline-smcomfortable: 6pxcompact: 4pxchanges with densitySpacing
motion.enter.duration--smbk-motion-enter-duration320msMotion
motion.enter.easing--smbk-motion-enter-easingcubic-bezier(0.16, 1, 0.3, 1)Motion
space.inline.2xl--smbk-space-inline-2xlcomfortable: 24pxcompact: 16pxchanges with densitySpacing
motion.exit.duration--smbk-motion-exit-duration200msMotion
motion.exit.easing--smbk-motion-exit-easingcubic-bezier(0.7, 0, 0.84, 0)Motion
size.target.comfortable--smbk-size-target-comfortable44pxSize
typography.label-lg--smbk-typography-label-lg-font-family--smbk-typography-label-lg-font-size--smbk-typography-label-lg-font-weight--smbk-typography-label-lg-line-height--smbk-typography-label-lg-letter-spacing--smbk-typography-label-lg-text-transformfontFamily: Geist, Geist Fallback, system-ui, sans-seriffontSize: 16pxfontWeight: 500lineHeight: 1.4letterSpacing: 0px

The quick brown fox

Typography
size.search.width--smbk-size-search-width320pxSize
space.stack.xs--smbk-space-stack-xs4pxSpacing
size.sidebar.width--smbk-size-sidebar-width280pxSize
size.icon.lg--smbk-size-icon-lg24pxSize
size.64--smbk-size-6464pxSize
layer.sticky--smbk-layer-sticky1100Stacking order
space.inset.lg--smbk-space-inset-lgcomfortable: 12pxcompact: 8pxchanges with densitySpacing
color.surface.canvas--smbk-color-surface-canvaslight: #e7ebf0dark: #111213changes with themeColor
size.header.height--smbk-size-header-heightphone: 56pxdesktop: 80pxchanges with layoutSize
Manifest
app-bar.manifest.json
{
  "name": "app-bar",
  "block": "smbk-app-bar",
  "summary": "The top bar of an application: brand, navigation links, then search, action buttons, the theme switch and the user, in five looks; the links fold into a menu when they do not fit.",
  "adapt": "css",
  "axes": {
    "look": {
      "values": [
        "floating",
        "floating-hug",
        "flat",
        "split",
        "centred"
      ],
      "default": "floating",
      "description": "Floating: a raised bar with rounded corners and a hairline edge, the links in the true middle. Floating hug: the same bar only as wide as its content, centered. Flat: a square bar with no edge or shadow, a line along its foot. Split: the brand on an island of its own at the start, the links and the end group on one at the end. Centred: the links at the start, the brand in the middle. Figma calls this Style."
    },
    "size": {
      "values": [
        "md",
        "lg"
      ],
      "default": "md",
      "description": "How large the links in the wide bar are. md is Figma's: the middle navigation item. lg is the large item, as the bar drew them before. The menu keeps its large items either way."
    },
    "background": {
      "values": [
        "on",
        "off"
      ],
      "default": "on",
      "description": "The bar's own surface. Off drops its fill, edge and shadow so it sits on whatever is behind it; the open menu keeps its surface, as Figma draws the open bar only with one, and a bar that hides on scroll takes the page's own surface while it sticks. Figma: Background (on by default)."
    },
    "line": {
      "values": [
        "on",
        "off"
      ],
      "default": "on",
      "description": "The hairline along the foot of a flat bar. Only the flat look draws it. Figma: Line (on by default)."
    },
    "logo": {
      "values": [
        "on",
        "off"
      ],
      "default": "on",
      "description": "The brand at the start of the bar in a wide space. Off drops it, for a page whose logo sits elsewhere, such as at the top of a sidebar that runs the page's full height; the links then start the bar, and a badge stays. The narrow bar keeps its logo either way."
    },
    "links": {
      "values": [
        "between",
        "start",
        "end"
      ],
      "default": "between",
      "description": "Where the links sit in a wide space. Between: in the middle of the bar, as Figma draws it. Start: right after the brand, the free room after them, as the Showroom App bar draws them. End: pushed to the end, just before the search, buttons and theme switch, for a bar laid over a page whose middle is its own, such as a home page with a large picture behind it. Start and end are not in the App bar component in Figma. The menu is the same either way."
    },
    "nav-type": {
      "values": [
        "links",
        "tabs"
      ],
      "default": "links",
      "description": "How the wide bar draws its links. Links: navigation items. Tabs: small line tabs that fill the bar's whole height, the current page's underline on the bar's foot; the bar is then 64 tall. Either way they are links, the current one marked as the current page, and the menu lists them as navigation items. Figma: AppBarNav's Type."
    },
    "fold": {
      "values": [
        "none",
        "actions",
        "links"
      ],
      "default": "none",
      "description": "What has folded away in a wide space too narrow for the whole row. Actions: the action buttons are gone. Links: the actions and the links are gone and the menu button shows, opening the links under the bar. The wrapper measures the row and sets it; markup written by hand sets it the same way."
    }
  },
  "flags": {
    "expanded": {
      "description": "The menu is open under the bar: in a narrow space, or in a wide one whose links have folded away."
    },
    "hide-on-scroll": {
      "description": "In a narrow space, the bar stays at the top of the window while the page scrolls, slides up out of sight as the reader scrolls down and comes back as they scroll up. For a page that scrolls the window; turned on page by page. Has no effect in a wide space. Not in Figma."
    },
    "scrolled-away": {
      "description": "The bar has slid up out of sight. The wrapper sets it while the reader scrolls down a page with hide on scroll on; plain markup sets it the same way. Has no effect without hide on scroll or in a wide space."
    },
    "zone": {
      "description": "The bar's own room, as Figma draws it: the medium inset above and below a floating bar and a step in from the sides, and its row held to the content width. Off by default, so a page that already leaves room around its bar keeps its own."
    },
    "sidebar-start": {
      "description": "In a wide space the start is as wide as the expanded sidebar, its logo the sidebar's logo size and in line with the sidebar's rows, so links that follow it (links start) begin where the page beside a sidebar begins. For a bar across the top of a page with a sidebar under it at the same side gutter as the bar's own inset. Not in the App bar component in Figma; drawn in the Showroom App bar."
    },
    "frosted": {
      "description": "A blur behind the bar, strongest at the top and gone by its foot, so what scrolls under it is never read sharply there. For a bar with its background off, or with its own room. Not drawn when the system asks for forced colors."
    }
  },
  "parts": [
    "panel",
    "frost",
    "bar",
    "start",
    "brand",
    "logo",
    "badge",
    "title",
    "trail",
    "nav",
    "end",
    "search",
    "actions",
    "divider",
    "menu-button",
    "second-row",
    "second-row-nav",
    "menu",
    "menu-end",
    "wide-only",
    "narrow-only"
  ],
  "figmaNodeId": "7353:700"
}