Headers & navigation / Headers & nav bars
Frosted Hairline Header
72px sticky bar with translucent near-black fill, 20px backdrop blur and a 1px white/8% bottom border. Logo left, muted grey nav links, a vertical divider, a Log in text link and a light pill Sign up button.
Rebuilt from linear.app in the Obsidian Precision style.
npx shadcn@latest add https://justyoink.it/r/obsidian-precision-5cbef2/blocks/frosted-pill-header.json
Looks exactly like linear.app: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/obsidian-precision-5cbef2/mine/frosted-pill-header.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, links ({label, href}[]), loginLabel, signupLabel. Renders a sticky 72px frosted header with a collapsible mobile menu; works with no props.
components/frosted-pill-header.tsx
import { useState } from "react"; type Link = { label: string; href: string }; type Props = { brand?: string; links?: Link[]; loginLabel?: string; signupLabel?: string; }; export default function FrostedHairlineHeader({ brand = "Northwind", links = [ { label: "Platform", href: "#" }, { label: "Guides", href: "#" }, { label: "Teams", href: "#" }, { label: "Pricing", href: "#" }, { label: "Updates", href: "#" }, { label: "Contact", href: "#" }, ], loginLabel = "Sign in", signupLabel = "Get started", }: Props) { const [open, setOpen] = useState(false); const linkCls = "rounded-md px-3 py-1.5 text-ui text-tertiary transition-colors duration-100 hover:bg-white/[0.08] hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-indigo"; return ( <header className="sticky top-0 z-50 w-full border-b border-white/[0.08] bg-[linear-gradient(rgba(11,11,11,0.8),rgba(11,11,11,0.7))] font-sans backdrop-blur-[20px]"> <div className="mx-auto flex h-[72px] max-w-[1280px] items-center justify-between px-6"> <a href="#" className="flex items-center gap-2 text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-indigo rounded-md" aria-label={brand}> <svg width="24" height="24" viewBox="0 0 24 24" aria-hidden="true"> <circle cx="12" cy="12" r="11" fill="currentColor" /> <path d="M4 14 14 4M7 19 19 7M12 21 21 12" stroke="#0b0b0b" strokeWidth="1.6" /> </svg> <span className="text-[20px] font-medium tracking-[-0.02em]">{brand}</span> </a> <nav aria-label="Main" className="hidden items-center gap-1 md:flex"> {links.map((l) => ( <a key={l.label} href={l.href} className={linkCls}>{l.label}</a> ))} <span className="mx-4 h-4 w-px bg-white/[0.08]" aria-hidden="true" /> <a href="#" className={linkCls}>{loginLabel}</a> <a href="#" className="ml-2 rounded-pill bg-[#e5e5e6] px-3.5 py-2 text-ui font-medium text-[#08090a] transition-colors duration-[160ms] hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-indigo">{signupLabel}</a> </nav> <button type="button" aria-label="Toggle menu" aria-expanded={open} onClick={() => setOpen(!open)} className="rounded-md p-2 text-tertiary hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-indigo md:hidden" > <svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.5"><path d="M3 6h14M3 14h14" /></svg> </button> </div> {open && ( <nav aria-label="Mobile" className="flex flex-col gap-1 border-t border-white/[0.08] px-6 py-4 md:hidden"> {links.map((l) => ( <a key={l.label} href={l.href} className={linkCls}>{l.label}</a> ))} <a href="#" className={linkCls}>{loginLabel}</a> <a href="#" className="mt-2 rounded-pill bg-[#e5e5e6] px-4 py-2 text-center text-ui font-medium text-[#08090a] hover:bg-white">{signupLabel}</a> </nav> )} </header> ); }import { useState } from "react"; type Link = { label: string; href: string }; type Props = { brand?: string; links?: Link[]; loginLabel?: string; signupLabel?: string; }; export default function FrostedHairlineHeader({ brand = "Northwind", links = [ { label: "Platform", href: "#" }, { label: "Guides", href: "#" }, { label: "Teams", href: "#" }, { label: "Pricing", href: "#" }, { label: "Updates", href: "#" }, { label: "Contact", href: "#" }, ], loginLabel = "Sign in", signupLabel = "Get started", }: Props) { const [open, setOpen] = useState(false); const linkCls = "rounded-md px-3 py-1.5 text-obsidian-ui text-muted-foreground transition-colors duration-100 hover:bg-foreground/[0.08] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary"; return ( <header className="sticky top-0 z-50 w-full border-b border-foreground/[0.08] bg-[linear-gradient(rgba(11,11,11,0.8),rgba(11,11,11,0.7))] font-sans backdrop-blur-[20px]"> <div className="mx-auto flex h-[72px] max-w-[1280px] items-center justify-between px-6"> <a href="#" className="flex items-center gap-2 text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded-md" aria-label={brand}> <svg width="24" height="24" viewBox="0 0 24 24" aria-hidden="true"> <circle cx="12" cy="12" r="11" fill="currentColor" /> <path d="M4 14 14 4M7 19 19 7M12 21 21 12" stroke="#0b0b0b" strokeWidth="1.6" /> </svg> <span className="text-[20px] font-medium tracking-[-0.02em]">{brand}</span> </a> <nav aria-label="Main" className="hidden items-center gap-1 md:flex"> {links.map((l) => ( <a key={l.label} href={l.href} className={linkCls}>{l.label}</a> ))} <span className="mx-4 h-4 w-px bg-foreground/[0.08]" aria-hidden="true" /> <a href="#" className={linkCls}>{loginLabel}</a> <a href="#" className="ml-2 rounded-full bg-primary px-3.5 py-2 text-obsidian-ui font-medium text-primary-foreground transition-colors duration-[160ms] hover:bg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary">{signupLabel}</a> </nav> <button type="button" aria-label="Toggle menu" aria-expanded={open} onClick={() => setOpen(!open)} className="rounded-md p-2 text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary md:hidden" > <svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.5"><path d="M3 6h14M3 14h14" /></svg> </button> </div> {open && ( <nav aria-label="Mobile" className="flex flex-col gap-1 border-t border-foreground/[0.08] px-6 py-4 md:hidden"> {links.map((l) => ( <a key={l.label} href={l.href} className={linkCls}>{l.label}</a> ))} <a href="#" className={linkCls}>{loginLabel}</a> <a href="#" className="mt-2 rounded-full bg-primary px-4 py-2 text-center text-obsidian-ui font-medium text-primary-foreground hover:bg-foreground">{signupLabel}</a> </nav> )} </header> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: not passedScrolls sideways at tablet width (768px)
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: not passed1 hard-coded colour (#0b0b0b). These ignore the theme and break dark mode.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.