Headers & navigation / Headers & nav bars
Spaced Mono Navigation Bar
Cobalt bar with six evenly spaced items: uppercase tracked mono links, a stacked two-line condensed centre wordmark, and a pale filled rounded Install button. Hides by sliding up and returns as a paper-coloured sticky bar.
Rebuilt from hermes-agent.nousresearch.com in the Electric Ultramarine Engraving style.
Looks exactly like hermes-agent.nousresearch.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
Pass leftItems/rightItems (two links each), wordmarkTop/wordmarkBottom, ctaLabel and ctaHref. The cobalt bar sits in flow; a paper sticky copy slides down after scrolling 240px.
components/framed-paper-nav.tsx
import { useEffect, useState } from "react"; type Item = { label: string; href: string }; type Props = { leftItems?: Item[]; rightItems?: Item[]; wordmarkTop?: string; wordmarkBottom?: string; ctaLabel?: string; ctaHref?: string; }; export default function SpacedMonoNavigationBar({ leftItems = [ { label: "Studio", href: "#studio" }, { label: "Engine", href: "#engine" }, ], rightItems = [ { label: "Circle", href: "#circle" }, { label: "Gateway", href: "#gateway" }, ], wordmarkTop = "Northwind", wordmarkBottom = "Relay", ctaLabel = "Get Northwind", ctaHref = "#install", }: Props) { const [stuck, setStuck] = useState(false); useEffect(() => { const onScroll = () => setStuck(window.scrollY > 240); onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); const link = "inline-flex items-center justify-center border border-transparent px-3 py-2 font-mono text-micro uppercase tracking-[0.2em] opacity-80 transition-all duration-nav-hover ease-nav-hover hover:border-[#f2f2f2] hover:bg-white/[0.04] hover:opacity-100 focus-visible:border-[#f2f2f2] focus-visible:opacity-100 focus-visible:outline-none"; const renderLinks = (items: Item[]) => items.map((i) => ( <a key={i.label} href={i.href} className={link}> {i.label} </a> )); const inner = (tone: "cobalt" | "paper") => ( <div className="mx-auto grid h-[116px] max-w-[1440px] grid-cols-2 items-center gap-y-2 px-4 md:grid-cols-6 md:px-8"> <div className="hidden justify-center md:flex">{renderLinks(leftItems.slice(0, 1))}</div> <div className="hidden justify-center md:flex">{renderLinks(leftItems.slice(1))}</div> <a href="#top" aria-label={`${wordmarkTop} ${wordmarkBottom}`} className="flex flex-col items-center text-center font-display text-h3 uppercase-none leading-[0.95] focus-visible:outline-none"> <span>{wordmarkTop}</span> <span>{wordmarkBottom}</span> </a> <div className="hidden justify-center md:flex">{renderLinks(rightItems.slice(0, 1))}</div> <div className="hidden justify-center md:flex">{renderLinks(rightItems.slice(1))}</div> <div className="flex justify-end md:justify-center"> <a href={ctaHref} className={`rounded-md px-3 py-2 font-display text-button transition-opacity duration-nav-hover ease-nav-hover hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ${ tone === "cobalt" ? "bg-paper-tint text-cobalt" : "bg-cobalt text-paper" }`} > {ctaLabel} </a> </div> </div> ); return ( <> <nav id="top" aria-label="Primary" className="relative w-full bg-cobalt text-paper"> {inner("cobalt")} </nav> <nav aria-label="Sticky primary" aria-hidden={!stuck} className={`fixed inset-x-0 top-0 z-50 bg-paper text-cobalt-deep shadow-subtle transition-transform duration-nav-slide ease-nav-slide ${ stuck ? "translate-y-0" : "-translate-y-full" }`} > {inner("paper")} </nav> </> ); }import { useEffect, useState } from "react"; type Item = { label: string; href: string }; type Props = { leftItems?: Item[]; rightItems?: Item[]; wordmarkTop?: string; wordmarkBottom?: string; ctaLabel?: string; ctaHref?: string; }; export default function SpacedMonoNavigationBar({ leftItems = [ { label: "Studio", href: "#studio" }, { label: "Engine", href: "#engine" }, ], rightItems = [ { label: "Circle", href: "#circle" }, { label: "Gateway", href: "#gateway" }, ], wordmarkTop = "Northwind", wordmarkBottom = "Relay", ctaLabel = "Get Northwind", ctaHref = "#install", }: Props) { const [stuck, setStuck] = useState(false); useEffect(() => { const onScroll = () => setStuck(window.scrollY > 240); onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); const link = "inline-flex items-center justify-center border border-transparent px-3 py-2 font-mono text-electric-micro uppercase tracking-[0.2em] opacity-80 transition-all duration-electric-nav-hover ease-electric-nav-hover hover:border-foreground hover:bg-foreground/[0.04] hover:opacity-100 focus-visible:border-foreground focus-visible:opacity-100 focus-visible:outline-none"; const renderLinks = (items: Item[]) => items.map((i) => ( <a key={i.label} href={i.href} className={link}> {i.label} </a> )); const inner = (tone: "cobalt" | "paper") => ( <div className="mx-auto grid h-[116px] max-w-[1440px] grid-cols-2 items-center gap-y-2 px-4 md:grid-cols-6 md:px-8"> <div className="hidden justify-center md:flex">{renderLinks(leftItems.slice(0, 1))}</div> <div className="hidden justify-center md:flex">{renderLinks(leftItems.slice(1))}</div> <a href="#top" aria-label={`${wordmarkTop} ${wordmarkBottom}`} className="flex flex-col items-center text-center font-sans text-electric-h3 uppercase-none leading-[0.95] focus-visible:outline-none"> <span>{wordmarkTop}</span> <span>{wordmarkBottom}</span> </a> <div className="hidden justify-center md:flex">{renderLinks(rightItems.slice(0, 1))}</div> <div className="hidden justify-center md:flex">{renderLinks(rightItems.slice(1))}</div> <div className="flex justify-end md:justify-center"> <a href={ctaHref} className={`rounded-sm px-3 py-2 font-sans text-electric-button transition-opacity duration-electric-nav-hover ease-electric-nav-hover hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ${ tone === "cobalt" ? "bg-foreground text-background" : "bg-background text-foreground" }`} > {ctaLabel} </a> </div> </div> ); return ( <> <nav id="top" aria-label="Primary" className="relative w-full bg-background text-foreground"> {inner("cobalt")} </nav> <nav aria-label="Sticky primary" aria-hidden={!stuck} className={`fixed inset-x-0 top-0 z-50 bg-foreground text-primary/90 shadow-electric-subtle transition-transform duration-electric-nav-slide ease-electric-nav-slide ${ stuck ? "translate-y-0" : "-translate-y-full" }`} > {inner("paper")} </nav> </> ); }
Quality checks
Automated, in a real browser · 5d ago- Accessible: not passedARIA hidden element must not be focusable or contain focusable elements (1 element)
- 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.