Malevich

Sections / Ready/

Site-header

Top chrome with logo + nav + actions; sticky opt-in, Sheet for mobile.

Site-header

Top-of-page chrome with four authored patterns selected via data-pattern. Built on CSS grid + container queries:

Patterns

data-pattern Layout Use for
standard (default) logo | nav (center) | actions | mobile Marketing sites (Linear-style)
inline logo | · | nav | actions | mobile Product sites with right-aligned nav (Stripe-style)
breadcrumb logo | breadcrumb-in-__nav | actions | mobile App chrome (Notion-style)
centered nav | logo (center) | actions | mobile Retail / brand sites (Apple-style)

Anatomy

<header class="site-header" data-pattern="standard" data-sticky="true">
  <a class="site-header__logo" href="/">Malevich</a>

  <nav class="site-header__nav" aria-label="Primary">
    <a href="/docs">Docs</a>
    <a href="/components">Components</a>
    <a href="/blog">Blog</a>
  </nav>

  <div class="site-header__actions">
    <button class="button -secondary -s">Sign in</button>
    <button class="button -primary -s">Get started</button>
  </div>

  <button class="site-header__mobile-trigger" type="button"
          aria-haspopup="dialog" aria-controls="mobile-menu"
          aria-expanded="false" aria-label="Open menu">
    ☰
  </button>
</header>

<dialog class="sheet" data-side="left" id="mobile-menu">
  <header class="sheet__header">
    <h2>Menu</h2>
    <button class="sheet__close" aria-label="Close"
            onclick="this.closest('dialog').close()">×</button>
  </header>
  <div class="sheet__body">
    <nav aria-label="Primary mobile">
      <a href="/docs">Docs</a>
      <!-- … -->
    </nav>
  </div>
</dialog>

The mobile-trigger button uses the same aria-haspopup="dialog" + aria-controls contract as Popover, so the Popover runtime auto-registers and wires up open/close + aria-expanded sync.

Sticky behavior

<header class="site-header" data-sticky="true">…</header>

CSS handles position: sticky; inset-block-start: 0. The header sits above scrolling content at z-index 100. Backdrop blur applies for the glassy look.

data-sticky is part of the behavior modifier category per ADR-0007; this is the second runtime-less behavior (copyable was the first behavior-with-runtime). For sticky, position:sticky natively covers the use case — no JS required.

Tokens used

Component-tier (generated)

Accessibility

Edge cases

Do

Don't