Buttons & actions / Buttons

Periwinkle and Glass Pill Buttons

Solid #5266eb pill with white text, glass outlined pill with translucent fill, and underlined text link; 16px medium label.

Rebuilt from mercury.com in the Twilight Ledger style.

npx shadcn@latest add https://justyoink.it/r/twilight-ledger-0e1ecf/blocks/pill-button-set.json

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

Usage

Props: brand, items (label + optional menu chevron), loginLabel, secondaryLabel, primaryLabel. Renders a frosted nav bar with a periwinkle pill, glass pill and hover-wash links; collapses to a menu button on mobile.

components/pill-button-set.tsx
import { useState } from "react";

type Item = { label: string; menu?: boolean };

export default function PeriwinklaGlassNav({
  brand = "Northwind",
  items = [
    { label: "Products", menu: true },
    { label: "Individuals" },
    { label: "Plans", menu: true },
    { label: "Guides", menu: true },
    { label: "Company", menu: true },
    { label: "Rates" },
  ] as Item[],
  loginLabel = "Sign in",
  secondaryLabel = "Watch tour",
  primaryLabel = "Get started",
}: {
  brand?: string;
  items?: Item[];
  loginLabel?: string;
  secondaryLabel?: string;
  primaryLabel?: string;
}) {
  const [open, setOpen] = useState(false);
  const chev = (
    <svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" strokeWidth="1.5" aria-hidden="true">
      <path d="M2.5 4.5 6 8l3.5-3.5" />
    </svg>
  );
  return (
    <header className="relative w-full overflow-hidden bg-[linear-gradient(100deg,#6b5a50,#7a7370_45%,#2f3a55)] font-sans text-ink">
      <nav className="relative mx-auto flex h-[72px] max-w-[1440px] items-center justify-between px-5 lg:px-8" aria-label="Main">
        <a href="#" className="flex items-center gap-2.5 rounded-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink">
          <svg width="32" height="32" viewBox="0 0 32 32" fill="none" stroke="currentColor" strokeWidth="1.2" aria-hidden="true">
            <circle cx="16" cy="16" r="15" />
            <circle cx="16" cy="10" r="4" />
            <circle cx="16" cy="22" r="4" />
            <circle cx="10" cy="16" r="4" />
            <circle cx="22" cy="16" r="4" />
          </svg>
          <span className="text-[17px] font-medium uppercase tracking-[0.2em]">{brand}</span>
        </a>
        <ul className="hidden items-center gap-1 lg:flex">
          {items.map((it) => (
            <li key={it.label}>
              <a href="#" className="group flex items-center gap-1.5 rounded-pill px-4 py-2 text-[15px] transition-colors duration-300 ease-out hover:bg-[#9cb4e8]/30 focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink">
                {it.label}
                {it.menu && chev}
              </a>
            </li>
          ))}
        </ul>
        <div className="hidden items-center gap-3 lg:flex">
          <a href="#" className="rounded-pill px-3 py-2 text-[15px] transition-colors duration-300 hover:bg-[#9cb4e8]/30 focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink">{loginLabel}</a>
          <a href="#" className="rounded-pill border border-white/30 bg-white/15 px-[17px] py-[7px] text-[15px] backdrop-blur-[20px] transition-colors duration-300 hover:bg-white/25 focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink">{secondaryLabel}</a>
          <a href="#" className="rounded-pill bg-[#5266eb] px-4 py-2 text-[15px] font-medium text-white transition-colors duration-300 hover:bg-[#6577f0] focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink">{primaryLabel}</a>
        </div>
        <button type="button" aria-label="Toggle menu" aria-expanded={open} onClick={() => setOpen(!open)} className="rounded-pill p-2 hover:bg-[#9cb4e8]/30 lg:hidden">
          <svg width="22" height="22" viewBox="0 0 22 22" stroke="currentColor" strokeWidth="1.6" aria-hidden="true"><path d="M3 7h16M3 15h16" /></svg>
        </button>
      </nav>
      {open && (
        <div className="flex flex-col gap-2 px-5 pb-5 lg:hidden">
          {items.map((it) => (
            <a key={it.label} href="#" className="rounded-pill px-3 py-2 hover:bg-[#9cb4e8]/30">{it.label}</a>
          ))}
          <a href="#" className="rounded-pill bg-[#5266eb] px-4 py-2 text-center font-medium text-white">{primaryLabel}</a>
        </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

Frosted Transparent Header

Headers & nav bars

Glass Email Capture Pill

Forms

Accordion Feature List with Product Mock

Feature sections

Dark Glass Account Panel Mockup

Media & mockups