Navigation Bar
The site header on every page, as a header landmark. It holds a skip link first, the green brand strip, an optional utility row, then the bar: the logo as a home link, the Navigation Menu, icon Buttons, the one action and, below the inline threshold, the drawer's menu Button.
import {
NavigationBar,
NavigationBarUtility,
NavigationBarUtilityLink,
} from '@fairgarden/design/navigation/navigation-bar'
The bar is an opaque kind="band" Ground: the page ground it sits in (paper, white or the page's one pastel), or preset="night" only directly over the night media hero. It is 56 px tall (64 px from --lg-n-above), with a full-bleed --role-rule bottom rule, and its content is capped at --fgd-container-content; with wide it runs to --fgd-container-wide, to meet a wide page frame such as the Docs Layout's columns. The logo is a plain home link unless you pass renderLink, such as (href) => <NextLink href={href} />, which the drawer's bar repeats. Inside the Docs Layout, which renders the page's skip link, the bar renders none. Panels attach under that rule. currentPath flows to the menu, the drawer and the utility links, which mark the current page and the parent of the current page by URL path.
The site header
The site header
From --fgd-nav-inline-n-above (1024 px by default, a build-time custom media) the inline menu and the 36 px utility row show. Below it they are replaced by the drawer's menu Button, and the utility links move to the drawer footer. Items never wrap. At the threshold the logo, items, search, action and gaps must fit the content container (944 px at 1024 px). Overflow goes to the utility row, then to a final "More" item with a dropdown panel, never a hamburger. A site over budget sets the custom media to 1440 px. Below 768 px the bar keeps the logo, the search trigger and the menu Button, and the action moves to the top of the drawer footer; below 360 px the "Menu" label drops to the icon. The logo gives way last: where the bar is too narrow for it, it shrinks inside its 44 px target rather than push the controls out, so the bar never overflows. A lockup drops its wordmark there and leaves the mark, as this one does below about 410 px.
Ruled, masthead and compact
Ruled, masthead and compact
ruled splits the items with vertical rules. masthead stacks a wordmark row over the caps nav row, ruled above and below. compact is the docked header at the same height: the utility row and brand drawing drop, and the triggers, search and action stay.
The header is static by default (dock="none"). dock="pinned" docks it after 50vh of scroll, and it stays until its own place scrolls back into view. dock="swap" works with the sticky section bar: pass a zero-height sentinelRef at the bar's in-flow position. Once it passes the viewport top, upward scroll brings the header back in place of the bar, and downward scroll restores the bar. Hide the bar while onDockChange reports true, so the two never stack. While docked, the header turns compact and takes the top edge on --layer-2, swapped in by a --fgd-duration-quick clip cut that is instant under reduced motion.
API Reference
NavigationBar
The site header: a skip link first, the green brand strip, an optional utility row, then the bar holding the logo (a home link), the Navigation Menu (from --fgd-nav-inline-n-above), icon Buttons, the one action and, below the threshold, the drawer’s menu Button. It is opaque, ruled at the bottom in --role-rule, 56 px tall (64 px from --lg-n-above), and its items never wrap: overflow goes to the utility row, then a “More” item [D183]. It prints as the §7.8 masthead’s logo only.
| Prop | Type | Description |
|---|---|---|
action | | The one primary action: a |
brandDrawing | | An optional fine-line brand drawing (--border-size-0–75) beside the logo; dropped when compact. |
compact | |
|
currentPath | | The current page’s URL path, shared with the menu, drawer and utility links. |
dock | | How the header docks. Default |
drawer | | The |
logo | | The logo: an ink logo in |
logoHref | | The home link. Default “/". |
logoLabel | | The home link’s accessible name, e.g. “FairGarden home”. |
masthead | |
|
onDockChange | | Called when the header docks ( |
preset | | The header preset: a page ground ( |
primary | | Override the preset’s primary (a pairing §2 verifies). Never defaulted [D133]. |
renderLink | | Builds the home link, e.g. |
ruled | |
|
search | | Icon Buttons, e.g. |
secondary | | Override the preset’s secondary. Never defaulted. |
sentinelRef | | With |
skipHref | | The skip link’s target. Default “#main”. Inside the docs layout, which renders the page’s skip link itself, the bar renders none. |
skipLabel | | The skip link’s words. Default “Skip to main content”. |
utility | | A |
wide | |
|
children | | The |
NavigationBarUtility and NavigationBarUtilityLink
The 36 px utility row above the bar (§11.3): secondary destinations as
text links in a nav labelled “Utility”, divided from the bar by a
--role-hairline rule, aligned to --fgd-container-content. Shown from
--fgd-nav-inline-n-above (below it, repeat its links in the drawer
footer); the compact docked header drops it [D183]. Put it in the bar’s
utility slot.
| Prop | Type | Description |
|---|---|---|
label | | The landmark’s name. Default “Utility”. |
locale | | An optional locale link at the end (“English ▾ Change language”); a control never sits here. |
start | | An optional start slot: a phone number or tagline, in --primary12. |
children | | The row’s |
A utility link: type-label caps, no rest underline, the bare-text
underline on hover [D181], a 24 px target at a 24 px pitch (the §1.5.12
utility exemption). The current page (its path equals the bar’s
currentPath) takes aria-current="page" and the --border-size-2–25 bar.
Additional types
navigationBar
NavigationBarContext
NavigationBarContextValue
NavigationBarDock
NavigationBarProps
NavigationBarUtilityLinkProps
NavigationBarUtilityProps
Specification: DESIGN-SYSTEM.md §11.5 (navigation bar) [D182, D183] and §11.3 (brand strip and utility bar); print per §7.8 (the masthead).