Headers & navigation / Headers & nav bars
Floating Pill Navigation Bar
A wide, rounded light-gray bar with a bold wordmark, nav items with small chevrons, an overlapping avatar pair with a 'Talk to sales' link, a text Sign in link and a dark pill 'Get started' button.
Rebuilt from cal.com in the Warm Paper Calendar style.
npx shadcn@latest add https://justyoink.it/r/warm-paper-calendar/blocks/pill-nav-bar.json
Looks exactly like cal.com: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/warm-paper-calendar/mine/pill-nav-bar.json
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 plus optional menu array for dropdowns), salesLabel, signInLabel, ctaLabel. Dropdowns open on hover, focus or click; the nav links collapse on screens below lg.
components/pill-nav-bar.tsx
import { useState } from "react"; type NavItem = { label: string; menu?: string[] }; export default function FloatingPillNavigationBar({ brand = "Plano.io", items = [ { label: "Products", menu: ["Scheduling", "Routing", "Reminders"] }, { label: "Use cases", menu: ["Teams", "Freelancers", "Education"] }, { label: "AI", menu: ["Assistant", "Summaries"] }, { label: "Features", menu: ["Calendars", "Payments", "Workflows"] }, { label: "Resources", menu: ["Blog", "Guides", "Changelog"] }, { label: "Enterprise" }, { label: "Pricing" }, ] as NavItem[], salesLabel = "Talk to sales", signInLabel = "Sign in", ctaLabel = "Get started", }: { brand?: string; items?: NavItem[]; salesLabel?: string; signInLabel?: string; ctaLabel?: string; }) { const [open, setOpen] = useState<string | null>(null); const link = "text-ui text-ink hover:text-muted duration-color-transition ease-color-transition transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink rounded-md"; return ( <header className="w-full px-3 pt-3 font-sans"> <nav aria-label="Main" className="mx-auto flex h-16 max-w-[1320px] items-center justify-between rounded-xl bg-panel px-3 md:px-4"> <div className="flex items-center gap-8"> <a href="#" className="font-display text-h3 font-bold tracking-[-0.04em] text-ink-deep px-1">{brand}</a> <ul className="hidden items-center gap-1 lg:flex"> {items.map((it) => ( <li key={it.label} className="relative" onMouseLeave={() => setOpen(null)}> <button type="button" aria-expanded={it.menu ? open === it.label : undefined} onMouseEnter={() => it.menu && setOpen(it.label)} onFocus={() => it.menu && setOpen(it.label)} onClick={() => it.menu && setOpen(open === it.label ? null : it.label)} className={link + " flex items-center gap-1 px-3 py-2"} > {it.label} {it.menu && ( <svg width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true" className={"text-soft transition-transform " + (open === it.label ? "rotate-180" : "")}> <path d="M2 3.5 5 6.5 8 3.5" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" /> </svg> )} </button> {it.menu && open === it.label && ( <div className="absolute left-0 top-full z-20 pt-2"> <ul className="min-w-[180px] rounded-lg bg-canvas p-2 shadow-soft shadow-ring-raised"> {it.menu.map((m) => ( <li key={m}> <a href="#" className="block rounded-md px-3 py-2 text-ui text-body hover:bg-panel hover:text-ink duration-color-transition ease-color-transition transition-colors">{m}</a> </li> ))} </ul> </div> )} </li> ))} </ul> </div> <div className="flex items-center gap-2 md:gap-4"> <a href="#" className={link + " hidden items-center gap-2 px-2 py-2 sm:flex"}> <span className="flex -space-x-2" aria-hidden="true"> <span className="flex h-6 w-6 items-center justify-center rounded-pill bg-gradient-to-br from-sand to-ink text-[10px] text-canvas ring-2 ring-panel">A</span> <span className="flex h-6 w-6 items-center justify-center rounded-pill bg-gradient-to-br from-hairline-strong to-muted text-[10px] text-canvas ring-2 ring-panel">M</span> </span> {salesLabel} </a> <a href="#" className={link + " hidden px-3 py-2 sm:block"}>{signInLabel}</a> <a href="#" className="rounded-lg bg-ink px-4 py-2.5 text-ui text-canvas hover:bg-ink-deep duration-color-transition ease-color-transition transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink focus-visible:ring-offset-2">{ctaLabel}</a> </div> </nav> </header> ); }import { useState } from "react"; type NavItem = { label: string; menu?: string[] }; export default function FloatingPillNavigationBar({ brand = "Plano.io", items = [ { label: "Products", menu: ["Scheduling", "Routing", "Reminders"] }, { label: "Use cases", menu: ["Teams", "Freelancers", "Education"] }, { label: "AI", menu: ["Assistant", "Summaries"] }, { label: "Features", menu: ["Calendars", "Payments", "Workflows"] }, { label: "Resources", menu: ["Blog", "Guides", "Changelog"] }, { label: "Enterprise" }, { label: "Pricing" }, ] as NavItem[], salesLabel = "Talk to sales", signInLabel = "Sign in", ctaLabel = "Get started", }: { brand?: string; items?: NavItem[]; salesLabel?: string; signInLabel?: string; ctaLabel?: string; }) { const [open, setOpen] = useState<string | null>(null); const link = "text-warm-ui text-foreground hover:text-muted-foreground duration-warm-color-transition ease-warm-color-transition transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground rounded-lg"; return ( <header className="w-full px-3 pt-3 font-sans"> <nav aria-label="Main" className="mx-auto flex h-16 max-w-[1320px] items-center justify-between rounded-2xl bg-card px-3 md:px-4"> <div className="flex items-center gap-8"> <a href="#" className="font-sans text-warm-h3 font-bold tracking-[-0.04em] text-muted-foreground px-1">{brand}</a> <ul className="hidden items-center gap-1 lg:flex"> {items.map((it) => ( <li key={it.label} className="relative" onMouseLeave={() => setOpen(null)}> <button type="button" aria-expanded={it.menu ? open === it.label : undefined} onMouseEnter={() => it.menu && setOpen(it.label)} onFocus={() => it.menu && setOpen(it.label)} onClick={() => it.menu && setOpen(open === it.label ? null : it.label)} className={link + " flex items-center gap-1 px-3 py-2"} > {it.label} {it.menu && ( <svg width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true" className={"text-muted-foreground transition-transform " + (open === it.label ? "rotate-180" : "")}> <path d="M2 3.5 5 6.5 8 3.5" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" /> </svg> )} </button> {it.menu && open === it.label && ( <div className="absolute left-0 top-full z-20 pt-2"> <ul className="min-w-[180px] rounded-xl bg-background p-2 shadow-warm-soft shadow-warm-ring-raised"> {it.menu.map((m) => ( <li key={m}> <a href="#" className="block rounded-lg px-3 py-2 text-warm-ui text-warm-body hover:bg-card hover:text-foreground duration-warm-color-transition ease-warm-color-transition transition-colors">{m}</a> </li> ))} </ul> </div> )} </li> ))} </ul> </div> <div className="flex items-center gap-2 md:gap-4"> <a href="#" className={link + " hidden items-center gap-2 px-2 py-2 sm:flex"}> <span className="flex -space-x-2" aria-hidden="true"> <span className="flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-foreground to-foreground text-[10px] text-background ring-2 ring-card">A</span> <span className="flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-border to-foreground text-[10px] text-background ring-2 ring-card">M</span> </span> {salesLabel} </a> <a href="#" className={link + " hidden px-3 py-2 sm:block"}>{signInLabel}</a> <a href="#" className="rounded-xl bg-foreground px-4 py-2.5 text-warm-ui text-background hover:bg-foreground duration-warm-color-transition ease-warm-color-transition transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground focus-visible:ring-offset-2">{ctaLabel}</a> </div> </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.