Headers & navigation / Headers & nav bars

Floating Pill Header

Transparent header with a wordmark at left and three pills at right: a circular icon toggle, a dark slate CTA with a dot, and a light MENU pill with two dots. Pills are fully rounded with small uppercase labels.

Rebuilt from lusion.co in the Periwinkle Studio Float style.

npx shadcn@latest add https://justyoink.it/r/periwinkle-studio-float/blocks/floating-pill-header.json

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

Usage

Props: wordmark, ctaLabel, menuLabel, onCtaClick, onMenuClick. The header is position:fixed, so place it at the top of the page; labels roll and pill colors invert on hover/focus, and the circle button toggles its icon.

components/floating-pill-header.tsx
import { useState } from "react";

type Props = {
  wordmark?: string;
  ctaLabel?: string;
  menuLabel?: string;
  onCtaClick?: () => void;
  onMenuClick?: () => void;
};

function Roll({ label }: { label: string }) {
  return (
    <span className="relative block h-[1.2em] overflow-hidden leading-[1.2]">
      <span className="block transition-transform duration-standard ease-standard group-hover:-translate-y-full group-focus-visible:-translate-y-full">{label}</span>
      <span aria-hidden="true" className="absolute left-0 top-full block transition-transform duration-standard ease-standard group-hover:-translate-y-full group-focus-visible:-translate-y-full">{label}</span>
    </span>
  );
}

export default function FloatingPillHeader({
  wordmark = "NORTHWIND",
  ctaLabel = "Get in touch",
  menuLabel = "Menu",
  onCtaClick,
  onMenuClick,
}: Props) {
  const [collapsed, setCollapsed] = useState(false);
  const pill = "group inline-flex h-[45px] items-center justify-center rounded-pill text-label uppercase text-[13px] tracking-normal transition-colors duration-standard ease-standard focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ink";
  return (
    <div className="relative min-h-[160px] bg-canvas font-sans">
      <header className="fixed inset-x-0 top-0 z-50">
        <div className="mx-auto flex max-w-[1296px] items-center justify-between px-4 pt-6 md:px-0">
          <a href="#" aria-label={wordmark + " home"} className="text-[28px] font-normal leading-none tracking-[0.02em] text-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink">
            {wordmark}
          </a>
          <div className="flex items-center gap-[18px]">
            <button
              type="button"
              aria-label="Toggle scene"
              aria-pressed={collapsed}
              onClick={() => setCollapsed(!collapsed)}
              className={pill + " w-[45px] bg-canvas-deep text-ink hover:bg-ink hover:text-paper"}
            >
              <svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round">
                {collapsed ? <path d="M9 3v12M3 9h12" /> : <path d="M3 9h12" />}
              </svg>
            </button>
            <button
              type="button"
              onClick={onCtaClick}
              className={pill + " hidden gap-6 bg-slate px-[22px] text-paper hover:bg-canvas-deep hover:text-ink sm:inline-flex"}
            >
              <Roll label={ctaLabel} />
              <span aria-hidden="true" className="h-[4px] w-[4px] rounded-circle bg-current" />
            </button>
            <button
              type="button"
              onClick={onMenuClick}
              className={pill + " gap-4 bg-canvas-deep px-[22px] text-ink hover:bg-ink hover:text-paper"}
            >
              <Roll label={menuLabel} />
              <span aria-hidden="true" className="flex gap-[3px]">
                <span className="h-[4px] w-[4px] rounded-circle bg-current" />
                <span className="h-[4px] w-[4px] rounded-circle bg-current" />
              </span>
            </button>
          </div>
        </div>
      </header>
    </div>
  );
}

Quality checks

Automated, in a real browser · today
—

More from Periwinkle Studio Float

The whole style →

Tilted Panel Loader

Animated graphics

Oversized Section Heading with Side Blurb

Feature sections

Rounded Project Tile

Cards

Dot-Separated Category Tags

Badges & tags

Plus Crosshair Grid Markers

Animated backgrounds

Persistent WebGL Backdrop

Animated backgrounds