Headers & navigation / Headers & nav bars
Minimal Black Header
Transparent black bar with logo left, muted text links (Platform, Solutions, Resources, Enterprise, Pricing) with chevrons, and right-aligned 'Log in' text link plus a white rounded 'Sign up' button. Collapses to a hamburger icon on narrow widths.
Rebuilt from framer.com in the Obsidian Canvas style.
Looks exactly like framer.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, links (string array; all but the last show chevrons), loginLabel, signupLabel. Renders standalone; the hamburger toggles a simple stacked menu below lg.
components/minimal-dark-header.tsx
import { useState } from "react"; const Chevron = () => ( <svg width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true" className="opacity-70"> <path d="M2 3.5 5 6.5 8 3.5" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" /> </svg> ); type Props = { brand?: string; links?: string[]; loginLabel?: string; signupLabel?: string; }; export default function MinimalBlackHeader({ brand = "Northwind", links = ["Platform", "Solutions", "Resources", "Enterprise", "Pricing"], loginLabel = "Log in", signupLabel = "Sign up", }: Props) { const [open, setOpen] = useState(false); const fade = "animate-[fadeInHdr_400ms_linear_both] motion-reduce:animate-none"; return ( <header className="relative w-full bg-canvas text-primary font-sans"> <style>{`@keyframes fadeInHdr{from{opacity:.001}to{opacity:1}}`}</style> <div className="mx-auto flex h-16 max-w-6xl items-center justify-between px-6"> <div className="flex items-center gap-10"> <a href="#" className="flex items-center gap-2 rounded-sm text-ui font-semibold focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-blue"> <svg width="18" height="24" viewBox="0 0 18 24" fill="currentColor" aria-hidden="true"> <path d="M0 0h18v8H9zM0 8h9l9 8H9v8L0 16z" /> </svg> {brand} </a> <nav aria-label="Main" className="hidden lg:block"> <ul className="flex items-center gap-6"> {links.map((l) => ( <li key={l}> <a href="#" className="flex items-center gap-1 rounded-sm text-ui text-primary/60 transition-colors duration-200 ease-linear hover:text-primary focus-visible:text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-blue"> {l} {l !== "Pricing" && <Chevron />} </a> </li> ))} </ul> </nav> </div> <div className="flex items-center gap-4"> <a href="#" className={`${fade} hidden rounded-sm text-ui text-primary/60 transition-colors duration-200 ease-linear hover:text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-blue sm:block`}> {loginLabel} </a> <a href="#" className={`${fade} rounded-lg bg-inverse-surface px-3 py-1.5 text-ui font-medium text-canvas transition-shadow focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-blue`}> {signupLabel} </a> <button type="button" aria-label="Toggle menu" aria-expanded={open} onClick={() => setOpen(!open)} className="rounded-sm p-1 text-primary lg:hidden focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-blue" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"> <path d="M3 8h18M3 16h18" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" /> </svg> </button> </div> </div> {open && ( <nav aria-label="Mobile" className="border-t border-hairline px-6 py-4 lg:hidden"> <ul className="flex flex-col gap-3"> {links.map((l) => ( <li key={l}> <a href="#" className="text-ui text-primary/60 transition-colors hover:text-primary">{l}</a> </li> ))} <li> <a href="#" className="text-ui text-primary/60 transition-colors hover:text-primary">{loginLabel}</a> </li> </ul> </nav> )} </header> ); }import { useState } from "react"; const Chevron = () => ( <svg width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true" className="opacity-70"> <path d="M2 3.5 5 6.5 8 3.5" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" /> </svg> ); type Props = { brand?: string; links?: string[]; loginLabel?: string; signupLabel?: string; }; export default function MinimalBlackHeader({ brand = "Northwind", links = ["Platform", "Solutions", "Resources", "Enterprise", "Pricing"], loginLabel = "Log in", signupLabel = "Sign up", }: Props) { const [open, setOpen] = useState(false); const fade = "animate-[fadeInHdr_400ms_linear_both] motion-reduce:animate-none"; return ( <header className="relative w-full bg-background text-foreground font-sans"> <style>{`@keyframes fadeInHdr{from{opacity:.001}to{opacity:1}}`}</style> <div className="mx-auto flex h-16 max-w-6xl items-center justify-between px-6"> <div className="flex items-center gap-10"> <a href="#" className="flex items-center gap-2 rounded-md text-obsidian-ui font-semibold focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary"> <svg width="18" height="24" viewBox="0 0 18 24" fill="currentColor" aria-hidden="true"> <path d="M0 0h18v8H9zM0 8h9l9 8H9v8L0 16z" /> </svg> {brand} </a> <nav aria-label="Main" className="hidden lg:block"> <ul className="flex items-center gap-6"> {links.map((l) => ( <li key={l}> <a href="#" className="flex items-center gap-1 rounded-md text-obsidian-ui text-foreground/60 transition-colors duration-200 ease-linear hover:text-foreground focus-visible:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary"> {l} {l !== "Pricing" && <Chevron />} </a> </li> ))} </ul> </nav> </div> <div className="flex items-center gap-4"> <a href="#" className={`${fade} hidden rounded-md text-obsidian-ui text-foreground/60 transition-colors duration-200 ease-linear hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary sm:block`}> {loginLabel} </a> <a href="#" className={`${fade} rounded-xl bg-primary px-3 py-1.5 text-obsidian-ui font-medium text-primary-foreground transition-shadow focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary`}> {signupLabel} </a> <button type="button" aria-label="Toggle menu" aria-expanded={open} onClick={() => setOpen(!open)} className="rounded-md p-1 text-foreground lg:hidden focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"> <path d="M3 8h18M3 16h18" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" /> </svg> </button> </div> </div> {open && ( <nav aria-label="Mobile" className="border-t border-border px-6 py-4 lg:hidden"> <ul className="flex flex-col gap-3"> {links.map((l) => ( <li key={l}> <a href="#" className="text-obsidian-ui text-foreground/60 transition-colors hover:text-foreground">{l}</a> </li> ))} <li> <a href="#" className="text-obsidian-ui text-foreground/60 transition-colors hover:text-foreground">{loginLabel}</a> </li> </ul> </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: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.