Skip to content
The Membrane Palette
Navigationstable

Navbar

Sticky translucent site header with brand, uppercase links (aria-current marks the active page) and an actions slot; collapses by its own width.

Examples

Site header

HTML for “Site header”
<header class="mp-navbar">
  <div class="mp-navbar__inner">
    <a class="mp-navbar__brand" href="#components">D'Césares</a>
    <nav class="mp-navbar__nav" aria-label="Primary">
      <ul class="mp-navbar__links">
        <li><a class="mp-navbar__link" href="#components" aria-current="page">Work</a></li>
        <li><a class="mp-navbar__link" href="#components">Writing</a></li>
        <li><a class="mp-navbar__link" href="#components">Workshops</a></li>
        <li><a class="mp-navbar__link" href="#components">About</a></li>
      </ul>
    </nav>
    <div class="mp-navbar__actions">
      <a class="mp-button" href="#components" data-size="sm">See the work</a>
    </div>
  </div>
</header>

Guidance

The site header. Sticky, 64px tall (--size-nav), translucent with a --blur-backdrop blur, warm hairline at the bottom. It uses a container query, so it reflows based on its own width — on narrow widths the links move to a horizontally scrolling row under the brand.

Accessibility

  • Wrap links in <nav aria-label="Primary">; mark the current page with aria-current="page" (that attribute drives the active style).
  • Put a skip link before the navbar.
  • The brand link needs an accessible name (aria-label) when it holds a mark instead of text. On Isaac's own sites the brand is the inlined dc monogram, themed with the action tokens; see DESIGN-SYSTEM.md §10.6.
  • Links keep a 44px target height.

API

Navbar classes
ClassKind
.mp-navbarroot
.mp-navbar__innerpart of .mp-navbar
.mp-navbar__brandpart of .mp-navbar
.mp-navbar__navpart of .mp-navbar
.mp-navbar__linkspart of .mp-navbar
.mp-navbar__linkpart of .mp-navbar
.mp-navbar__actionspart of .mp-navbar

States styled: :focus-visible :hover [aria-current="page"]. Set the native attribute or ARIA state; there are no state classes.

Navbar component tokens
TokenDefaultLight · dark
--mp-navbar-bgvar(--color-bg-primary)#FAF6EE · #1A1B1F
--mp-navbar-fgvar(--color-text-primary)#2A2622 · #F0EBE1
--mp-navbar-linkvar(--color-text-secondary)#5C564E · #A39D93
--mp-navbar-link-hovervar(--color-text-primary)#2A2622 · #F0EBE1
--mp-navbar-link-bg-hovervar(--color-bg-hover)rgba(42, 38, 34, 0.06) · rgba(240, 235, 225, 0.06)
--mp-navbar-link-currentvar(--color-human-text)#944425 · #E08A6A
--mp-navbar-indicatorvar(--color-action-primary)#B35530 · #D4724F

Design tokens consumed: --blur-backdrop --border-default --border-width-medium --color-action-primary --color-bg-hover --color-bg-primary --color-human-text --color-text-primary --color-text-secondary --container-xl --focus-ring --focus-ring-offset --font-sans --font-serif --radius-full --radius-sm --site-margin --size-nav --size-nav-mobile --size-touch-target --space-1 --space-2 --space-3 --space-4 --space-6 --space-8 --text-h4 --text-xs --tracking-heading --tracking-label --transition-fast --weight-bold --weight-semibold --z-nav

Verified contrast

The build measures each pair for the defaults and for every tone, variant and state that reassigns a token, over page and card surfaces. The ratios below are the worst case in each mode; a pair below its minimum stops the build.

Navbar contrast pairs
UsePairLightDarkMinimum
brand--mp-navbar-fg on --mp-navbar-bg13.9314.487.0
nav link--mp-navbar-link on --mp-navbar-bg6.736.394.5
nav link, hover--mp-navbar-link-hover on --mp-navbar-link-bg-hover12.5112.524.5
current page link--mp-navbar-link-current on --mp-navbar-bg6.266.574.5
current page underline--mp-navbar-indicator on --mp-navbar-bg4.575.183.0

Source