Headers & navigation / Headers & nav bars

Frosted Hairline Header

Full-width white bar with a wordmark on the left, dark navy nav items with small chevrons, and a solid purple 'Contact sales' button on the right. The ribbon artwork bleeds in behind the bar's right half.

Rebuilt from stripe.com in the Iridescent Ledger style.

npx shadcn@latest add https://justyoink.it/r/iridescent-ledger/blocks/hairline-header.json

Looks exactly like stripe.com: brings its fonts and colours, namespaced so your own theme stays untouched.

Usage

Props: brand, items (array of {label, menu?}), ctaLabel, ctaHref. Items with a menu array open a megamenu panel on hover or focus; renders standalone with defaults.

components/hairline-header.tsx
import { useState } from "react";

type Item = { label: string; menu?: string[] };

type Props = {
  brand?: string;
  items?: Item[];
  ctaLabel?: string;
  ctaHref?: string;
};

const defaultItems: Item[] = [
  { label: "Products", menu: ["Payments", "Billing", "Reports", "Treasury"] },
  { label: "Solutions", menu: ["Marketplaces", "Subscriptions", "Platforms", "Retail"] },
  { label: "Developers", menu: ["Docs", "API reference", "Guides", "Status"] },
  { label: "Resources", menu: ["Blog", "Customer stories", "Events", "Support"] },
  { label: "Pricing" },
];

function Chevron() {
  return (
    <svg width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true" className="transition-transform duration-smooth ease-smooth group-hover:translate-y-px">
      <path d="M2 3.5 5 6.5 8 3.5" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  );
}

export default function FrostedHairlineHeader({
  brand = "Northwind",
  items = defaultItems,
  ctaLabel = "Contact sales",
  ctaHref = "#",
}: Props) {
  const [open, setOpen] = useState<number | null>(null);

  return (
    <header className="relative isolate w-full bg-canvas" onMouseLeave={() => setOpen(null)}>
      <div className="relative z-20 overflow-hidden rounded-b-lg bg-surface/80 backdrop-blur-md">
        <div aria-hidden="true" className="pointer-events-none absolute inset-y-0 right-0 w-3/5 opacity-90">
          <div className="absolute inset-0 bg-[linear-gradient(105deg,transparent_0%,#c3d4ff_18%,#c9b6f5_30%,transparent_38%,var(--color-signal-orange)_52%,#ff8a1f_70%,var(--color-signal-magenta)_92%,#ff7ac0_100%)] blur-sm" />
          <div className="absolute inset-0 bg-gradient-to-r from-surface via-transparent to-transparent" />
        </div>
        <div className="relative mx-auto flex h-[76px] max-w-6xl items-center justify-between px-6">
          <div className="flex items-center gap-8">
            <a href="#" className="flex items-center gap-2 font-display text-h3 text-ink-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent">
              <span aria-hidden="true" className="h-5 w-5 rounded-sm bg-accent" />
              {brand}
            </a>
            <nav aria-label="Main" className="hidden md:block">
              <ul className="flex items-center gap-1">
                {items.map((it, i) => (
                  <li key={it.label} onMouseEnter={() => setOpen(it.menu ? i : null)}>
                    <button
                      type="button"
                      aria-expanded={it.menu ? open === i : undefined}
                      onFocus={() => setOpen(it.menu ? i : null)}
                      className="group flex items-center gap-1.5 rounded-sm px-3 py-2 text-ui text-ink-deep transition-colors duration-link ease-link hover:text-accent focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent"
                    >
                      {it.label}
                      {it.menu && <Chevron />}
                    </button>
                  </li>
                ))}
              </ul>
            </nav>
          </div>
          <a
            href={ctaHref}
            className="group inline-flex items-center gap-1.5 rounded-md bg-accent px-5 py-2.5 text-ui text-surface transition-colors duration-link ease-link hover:bg-accent-soft hover:text-accent focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent"
          >
            {ctaLabel}
            <svg width="8" height="10" viewBox="0 0 8 10" fill="none" aria-hidden="true" className="transition-transform duration-smooth ease-smooth group-hover:translate-x-0.5">
              <path d="M2 1.5 5.5 5 2 8.5" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" />
            </svg>
          </a>
        </div>
      </div>
      {open !== null && items[open]?.menu && (
        <div className="absolute left-0 right-0 top-full z-10 hidden md:block">
          <div className="mx-auto max-w-6xl px-6">
            <ul className="grid grid-cols-4 gap-1 rounded-lg border border-hairline bg-surface p-4 shadow-floating">
              {items[open].menu!.map((m) => (
                <li key={m}>
                  <a href="#" className="block rounded-md px-3 py-3 text-ui text-ink transition-colors duration-link ease-link hover:bg-accent-wash hover:text-accent">
                    {m}
                  </a>
                </li>
              ))}
            </ul>
          </div>
        </div>
      )}
    </header>
  );
}

Quality checks

Automated, in a real browser · 5d ago
—

More from Iridescent Ledger

The whole style →

Checklist Feature Columns

Feature sections

Iridescent Ribbon Hero

Heroes

Dated Article Row

Blog & articles

Saturated Highlight Card Strip

Carousels

Sticky Pill Sub-Navigation

Tab bars

Mockup Bento Grid

Feature sections