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.

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

Quality checks

Automated, in a real browser · 4d ago
—

More from Warm Paper Calendar

The whole style →

Hub-and-Spoke Integration Diagram

Animated graphics

Customer Story Accordion

Accordions

Inline-Chip Headline Hero

Heroes

Frosted Desktop Booking Mockup

Media & mockups

Monochrome Logo Grid

Logo clouds

Step Accordion with Grain Photo

Feature sections