Headers & navigation / Headers & nav bars

Frosted Transparent Header

Transparent overlay header with wordmark left, centered chevron dropdown links, and right-aligned text link, glass outlined pill and solid periwinkle pill. Inverts to dark text on the light release page.

Rebuilt from mercury.com in the Twilight Ledger style.

npx shadcn@latest add https://justyoink.it/r/twilight-ledger-0e1ecf/blocks/frosted-nav-bar.json

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

Usage

Place at the top of a hero with a photo behind it; the header is absolutely positioned and transparent. Props: brand, items (label + optional menu), loginLabel, demoLabel, ctaLabel, and light to switch to dark text for light pages.

components/frosted-nav-bar.tsx
import { useState } from "react";

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

type Props = {
  brand?: string;
  items?: NavItem[];
  loginLabel?: string;
  demoLabel?: string;
  ctaLabel?: string;
  light?: boolean;
};

const defaultItems: NavItem[] = [
  { label: "Business", menu: ["Checking", "Savings", "Cards"] },
  { label: "Personal" },
  { label: "Solutions", menu: ["Payments", "Treasury", "Invoicing"] },
  { label: "Resources", menu: ["Guides", "Help center", "Changelog"] },
  { label: "About", menu: ["Company", "Careers", "Press"] },
  { label: "Pricing" },
];

function Chevron() {
  return (
    <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
      <path d="M3.5 6l4.5 4.5L12.5 6" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  );
}

function Mark() {
  return (
    <svg width="32" height="32" viewBox="0 0 32 32" fill="none" aria-hidden="true">
      <circle cx="16" cy="16" r="15" stroke="currentColor" strokeWidth="1.2" />
      <circle cx="16" cy="10" r="4" stroke="currentColor" strokeWidth="1.2" />
      <circle cx="16" cy="22" r="4" stroke="currentColor" strokeWidth="1.2" />
      <circle cx="10" cy="16" r="4" stroke="currentColor" strokeWidth="1.2" />
      <circle cx="22" cy="16" r="4" stroke="currentColor" strokeWidth="1.2" />
    </svg>
  );
}

export default function FrostedTransparentHeader({
  brand = "HARBORLINE",
  items = defaultItems,
  loginLabel = "Sign in",
  demoLabel = "Book a tour",
  ctaLabel = "Get started",
  light = false,
}: Props) {
  const [open, setOpen] = useState<number | null>(null);
  const text = light ? "text-ink-dark" : "text-ink";
  const wash = "transition-colors duration-hover-wash ease-hover-wash hover:bg-[#9cb4e8]/30";
  const focus = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent";

  return (
    <header className={`absolute inset-x-0 top-0 z-50 ${text} font-sans`}>
      <div className="mx-auto flex h-[72px] max-w-[1440px] items-center justify-between px-5 lg:px-8">
        <a href="#" className={`flex items-center gap-3 rounded-md ${focus}`} aria-label={brand}>
          <Mark />
          <span className="text-[16px] font-medium tracking-[0.2em]">{brand}</span>
        </a>

        <nav aria-label="Main" className="hidden items-center gap-1 lg:flex">
          {items.map((it, i) => (
            <div key={it.label} className="relative" onMouseLeave={() => setOpen(null)}>
              <button
                type="button"
                aria-haspopup={it.menu ? "menu" : undefined}
                aria-expanded={it.menu ? open === i : undefined}
                onClick={() => it.menu && setOpen(open === i ? null : i)}
                className={`group flex items-center gap-1.5 rounded-lg px-4 py-2 text-label ${wash} ${focus}`}
              >
                {it.label}
                {it.menu && <Chevron />}
              </button>
              {it.menu && open === i && (
                <ul role="menu" className="absolute left-0 top-full mt-1 min-w-[180px] rounded-xl border border-hairline bg-surface/80 p-2 text-ink shadow-float backdrop-blur-[20px]">
                  {it.menu.map((m) => (
                    <li key={m} role="none">
                      <a role="menuitem" href="#" className={`block rounded-md px-3 py-2 text-label ${wash} ${focus}`}>{m}</a>
                    </li>
                  ))}
                </ul>
              )}
            </div>
          ))}
        </nav>

        <div className="flex items-center gap-2 text-label">
          <a href="#" className={`hidden rounded-lg px-4 py-2 sm:block ${wash} ${focus}`}>{loginLabel}</a>
          <a href="#" className={`hidden rounded-pill border border-hairline bg-glass-fill px-4 py-2 backdrop-blur-[20px] ${wash} ${focus} md:block`}>{demoLabel}</a>
          <a href="#" className={`rounded-pill bg-accent px-4 py-2 text-white transition-opacity duration-hover-wash hover:opacity-90 ${focus}`}>{ctaLabel}</a>
        </div>
      </div>
    </header>
  );
}

Quality checks

Automated, in a real browser · 4d ago
—

More from Twilight Ledger

The whole style →

Light Release Notes Header

Changelog

Cinematic Landscape Hero

Heroes

Glass Email Capture Pill

Forms

Accordion Feature List with Product Mock

Feature sections

Dark Glass Account Panel Mockup

Media & mockups

Faded Logo Marquee

Marquees & tickers