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.
npx shadcn@latest add https://justyoink.it/r/twilight-ledger-0e1ecf/mine/pill-button-set.json
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
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> ); }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-foreground"> <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-lg focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground"> <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-full 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-foreground"> {it.label} {it.menu && chev} </a> </li> ))} </ul> <div className="hidden items-center gap-3 lg:flex"> <a href="#" className="rounded-full px-3 py-2 text-[15px] transition-colors duration-300 hover:bg-[#9cb4e8]/30 focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground">{loginLabel}</a> <a href="#" className="rounded-full border border-foreground/30 bg-foreground/15 px-[17px] py-[7px] text-[15px] backdrop-blur-[20px] transition-colors duration-300 hover:bg-foreground/25 focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground">{secondaryLabel}</a> <a href="#" className="rounded-full bg-primary px-4 py-2 text-[15px] font-medium text-primary-foreground transition-colors duration-300 hover:bg-[#6577f0] focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground">{primaryLabel}</a> </div> <button type="button" aria-label="Toggle menu" aria-expanded={open} onClick={() => setOpen(!open)} className="rounded-full 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-full px-3 py-2 hover:bg-[#9cb4e8]/30">{it.label}</a> ))} <a href="#" className="rounded-full bg-primary px-4 py-2 text-center font-medium text-primary-foreground">{primaryLabel}</a> </div> )} </header> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: not passed2 hard-coded colours (bg-[#9cb4e8]/30, bg-[#6577f0]). These ignore the theme and break dark mode.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.