Headers & navigation / Headers & nav bars
Hairline Navigation Bar
Full-width bar on the #fafafa canvas: triangle mark at left, text links with small chevrons, then on the right a white outlined 'Get a Demo', white 'Log In' and solid ink 'Sign Up' button. 14px type, 6px radii, no bottom border.
Rebuilt from vercel.com in the Monochrome Precision style.
Looks exactly like vercel.com: brings its fonts and colours, namespaced so your own theme stays untouched.
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 flag for chevron, href), demoLabel, loginLabel, signupLabel. Renders standalone; collapses to a menu button on mobile.
components/minimal-nav-bar.tsx
import { useState } from "react"; type NavItem = { label: string; menu?: boolean; href?: string }; type Props = { brand?: string; items?: NavItem[]; demoLabel?: string; loginLabel?: string; signupLabel?: string; }; const Chevron = () => ( <svg width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true" className="ml-1.5"> <path d="M2 3.5 5 6.5 8 3.5" stroke="currentColor" strokeWidth="1.2" strokeLinecap="round" strokeLinejoin="round" /> </svg> ); export default function HairlineNavigationBar({ brand = "Northwind", items = [ { label: "Products", menu: true }, { label: "Resources", menu: true }, { label: "Enterprise", href: "#" }, { label: "Pricing", href: "#" }, ], demoLabel = "Book a Tour", loginLabel = "Sign In", signupLabel = "Get Started", }: Props) { const [open, setOpen] = useState(false); const linkCls = "group inline-flex items-center text-ui text-secondary hover:text-ink focus-visible:text-ink outline-none focus-visible:ring-2 focus-visible:ring-link-blue rounded-md transition-colors duration-text-hover ease-text-hover"; const btn = "inline-flex h-8 items-center rounded-md px-3 text-ui outline-none shadow-ring focus-visible:ring-2 focus-visible:ring-link-blue transition-colors duration-hover-fill ease-hover-fill"; return ( <header className="w-full bg-canvas font-sans"> <div className="mx-auto flex h-16 max-w-[1440px] items-center justify-between px-6"> <div className="flex items-center gap-8"> <a href="#" aria-label={brand} className="text-ink outline-none focus-visible:ring-2 focus-visible:ring-link-blue rounded-xs"> <svg width="22" height="20" viewBox="0 0 22 20" fill="currentColor" aria-hidden="true"><path d="M11 1 21 19H1z" /></svg> </a> <nav aria-label="Main" className="hidden items-center gap-6 md:flex"> {items.map((it) => it.menu ? ( <button key={it.label} type="button" className={linkCls}> {it.label} <Chevron /> </button> ) : ( <a key={it.label} href={it.href} className={linkCls}>{it.label}</a> ) )} </nav> </div> <div className="flex items-center gap-2"> <a href="#" className={`${btn} hidden bg-surface text-ink hover:bg-surface-muted sm:inline-flex`}>{demoLabel}</a> <a href="#" className={`${btn} hidden bg-surface text-ink hover:bg-surface-muted sm:inline-flex`}>{loginLabel}</a> <a href="#" className={`${btn} bg-ink text-surface hover:bg-ink-hover shadow-none`}>{signupLabel}</a> <button type="button" aria-label="Toggle menu" aria-expanded={open} onClick={() => setOpen(!open)} className={`${btn} bg-surface px-2 text-ink md:hidden`} > <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M2 4h12M2 8h12M2 12h12" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" /></svg> </button> </div> </div> {open && ( <nav aria-label="Mobile" className="flex flex-col gap-3 px-6 pb-4 md:hidden"> {items.map((it) => ( <a key={it.label} href={it.href ?? "#"} className={linkCls}>{it.label}</a> ))} </nav> )} </header> ); }import { useState } from "react"; type NavItem = { label: string; menu?: boolean; href?: string }; type Props = { brand?: string; items?: NavItem[]; demoLabel?: string; loginLabel?: string; signupLabel?: string; }; const Chevron = () => ( <svg width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true" className="ml-1.5"> <path d="M2 3.5 5 6.5 8 3.5" stroke="currentColor" strokeWidth="1.2" strokeLinecap="round" strokeLinejoin="round" /> </svg> ); export default function HairlineNavigationBar({ brand = "Northwind", items = [ { label: "Products", menu: true }, { label: "Resources", menu: true }, { label: "Enterprise", href: "#" }, { label: "Pricing", href: "#" }, ], demoLabel = "Book a Tour", loginLabel = "Sign In", signupLabel = "Get Started", }: Props) { const [open, setOpen] = useState(false); const linkCls = "group inline-flex items-center text-monochrome-ui text-muted-foreground hover:text-foreground focus-visible:text-foreground outline-none focus-visible:ring-2 focus-visible:ring-primary rounded-md transition-colors duration-monochrome-text-hover ease-monochrome-text-hover"; const btn = "inline-flex h-8 items-center rounded-md px-3 text-monochrome-ui outline-none shadow-monochrome-ring focus-visible:ring-2 focus-visible:ring-primary transition-colors duration-monochrome-hover-fill ease-monochrome-hover-fill"; return ( <header className="w-full bg-background font-sans"> <div className="mx-auto flex h-16 max-w-[1440px] items-center justify-between px-6"> <div className="flex items-center gap-8"> <a href="#" aria-label={brand} className="text-foreground outline-none focus-visible:ring-2 focus-visible:ring-primary rounded-sm"> <svg width="22" height="20" viewBox="0 0 22 20" fill="currentColor" aria-hidden="true"><path d="M11 1 21 19H1z" /></svg> </a> <nav aria-label="Main" className="hidden items-center gap-6 md:flex"> {items.map((it) => it.menu ? ( <button key={it.label} type="button" className={linkCls}> {it.label} <Chevron /> </button> ) : ( <a key={it.label} href={it.href} className={linkCls}>{it.label}</a> ) )} </nav> </div> <div className="flex items-center gap-2"> <a href="#" className={`${btn} hidden bg-card text-foreground hover:bg-secondary sm:inline-flex`}>{demoLabel}</a> <a href="#" className={`${btn} hidden bg-card text-foreground hover:bg-secondary sm:inline-flex`}>{loginLabel}</a> <a href="#" className={`${btn} bg-foreground text-card hover:bg-foreground shadow-none`}>{signupLabel}</a> <button type="button" aria-label="Toggle menu" aria-expanded={open} onClick={() => setOpen(!open)} className={`${btn} bg-card px-2 text-foreground md:hidden`} > <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M2 4h12M2 8h12M2 12h12" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" /></svg> </button> </div> </div> {open && ( <nav aria-label="Mobile" className="flex flex-col gap-3 px-6 pb-4 md:hidden"> {items.map((it) => ( <a key={it.label} href={it.href ?? "#"} className={linkCls}>{it.label}</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: 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: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.