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.

npx shadcn@latest add https://justyoink.it/r/monochrome-precision/blocks/minimal-nav-bar.json

Looks exactly like vercel.com: brings its fonts and colours, namespaced so your own theme stays untouched.

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>
  );
}

Quality checks

Automated, in a real browser · 4d ago
—

More from Monochrome Precision

The whole style →

Ink and Ghost Button Pair

Buttons

Dashed Orbit Integration Ring

Animated graphics

Customer Story Index List

Lists

Centered Quote with Meta Row

Testimonials

Floating Triangle Hero with Logo Strip

Heroes

Product Screenshot Story Blocks

Feature sections