Headers & navigation / Headers & nav bars
Hairline Pill Nav Header
Sticky borderless header with a serif wordmark on the left and a cluster of small hairline-outlined pill links on the right (Work, Profile, News, Events, Contact), muted grey text. 15px side padding.
Rebuilt from thisislandscape.com in the Gallery White Editorial style.
Looks exactly like thisislandscape.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: `wordmark` (string) and `links` (array of {label, href}). The header is sticky, hides on scroll down and returns on scroll up; pills darken text and border on hover over 300ms.
components/hairline-pill-nav.tsx
import { useEffect, useRef, useState } from "react"; export default function HairlinePillNavHeader({ wordmark = "Meridian", links = [ { label: "Work", href: "#work" }, { label: "Profile", href: "#profile" }, { label: "News", href: "#news" }, { label: "Events", href: "#events" }, { label: "Contact", href: "#contact" }, ], }: { wordmark?: string; links?: { label: string; href: string }[]; }) { const [hidden, setHidden] = useState(false); const lastY = useRef(0); useEffect(() => { const onScroll = () => { const y = window.scrollY; if (y > lastY.current && y > 64) setHidden(true); else if (y < lastY.current) setHidden(false); lastY.current = y; }; window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); return ( <header className={`sticky top-0 z-50 w-full bg-canvas px-[15px] py-3 transition-transform duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] motion-reduce:transition-none ${hidden ? "-translate-y-full" : "translate-y-0"}`} > <div className="flex items-center justify-between gap-4"> <a href="#" className="font-serif-logo text-[32px] leading-none tracking-[-0.03em] text-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink" > {wordmark} <sup className="ml-0.5 align-top text-[8px]">®</sup> </a> <nav aria-label="Primary"> <ul className="flex flex-wrap items-center justify-end"> {links.map((l) => ( <li key={l.label}> <a href={l.href} className="inline-block rounded-full border border-ink/10 px-2 py-1 font-sans text-[14px] font-medium leading-[1.3] text-ink/40 transition-colors duration-300 ease-[cubic-bezier(0,0,0.2,1)] hover:border-ink hover:text-ink focus-visible:border-ink focus-visible:text-ink focus-visible:outline-none" > {l.label} </a> </li> ))} </ul> </nav> </div> </header> ); }import { useEffect, useRef, useState } from "react"; export default function HairlinePillNavHeader({ wordmark = "Meridian", links = [ { label: "Work", href: "#work" }, { label: "Profile", href: "#profile" }, { label: "News", href: "#news" }, { label: "Events", href: "#events" }, { label: "Contact", href: "#contact" }, ], }: { wordmark?: string; links?: { label: string; href: string }[]; }) { const [hidden, setHidden] = useState(false); const lastY = useRef(0); useEffect(() => { const onScroll = () => { const y = window.scrollY; if (y > lastY.current && y > 64) setHidden(true); else if (y < lastY.current) setHidden(false); lastY.current = y; }; window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); return ( <header className={`sticky top-0 z-50 w-full bg-background px-[15px] py-3 transition-transform duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] motion-reduce:transition-none ${hidden ? "-translate-y-full" : "translate-y-0"}`} > <div className="flex items-center justify-between gap-4"> <a href="#" className="font-sans text-[32px] leading-none tracking-[-0.03em] text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground" > {wordmark} <sup className="ml-0.5 align-top text-[8px]">®</sup> </a> <nav aria-label="Primary"> <ul className="flex flex-wrap items-center justify-end"> {links.map((l) => ( <li key={l.label}> <a href={l.href} className="inline-block rounded-full border border-foreground/10 px-2 py-1 font-sans text-[14px] font-medium leading-[1.3] text-foreground/40 transition-colors duration-300 ease-[cubic-bezier(0,0,0.2,1)] hover:border-foreground hover:text-foreground focus-visible:border-foreground focus-visible:text-foreground focus-visible:outline-none" > {l.label} </a> </li> ))} </ul> </nav> </div> </header> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: not passedElements must meet minimum color contrast ratio thresholds (5 elements)
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: not passedElements must meet minimum color contrast ratio thresholds (5 elements)
- 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.