Header

The fixed top bar of a site — brand logo, primary navigation, key actions, and an optional search overlay. Below 810px it collapses into a two-level mobile menu.

Install

Examples

Default

Pass nav-links as a JSON array of { label, href }; primary-label / primary-href set the CTA. (Framed here — in production it spans the viewport and is fixed to the top.)

Secondary action

Add secondary-label / secondary-href for a lower-emphasis action beside the primary CTA — typically “Sign in”.

Nav alignment

nav-align positions the links — center (default), leading, or trailing.

With search

Set show-search to reveal the search icon, and provide pages to match against via the .searchItems property (an array of { label, href, group }). Click the magnifier to open the overlay.

Guidelines

Usage

site-wide navigation, marketing-site headers, and app top bars. Pairs with the Footer at the bottom of the page.

Do

  • Keep top-level nav short — a handful of destinations, not a sitemap.
  • Lead with a single primary CTA; pair it with at most one secondary action.
  • Set active-href / active-section so the current page reads as selected.

Don’t

  • Don’t stack multiple primary CTAs competing for attention.
  • Don’t enable show-search without supplying .searchItems.
  • Don’t put a second fixed header on the page — it’s a single, page-level landmark.

Accessibility

Properties

Related