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.
Looks exactly like lusion.co: 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: 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> ); }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-periwinkle-standard ease-periwinkle-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-periwinkle-standard ease-periwinkle-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-full text-periwinkle-label uppercase text-[13px] tracking-normal transition-colors duration-periwinkle-standard ease-periwinkle-standard focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-foreground"; return ( <div className="relative min-h-[160px] bg-background 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-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground"> {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-popover text-background hover:bg-foreground hover:text-card"} > <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-primary px-[22px] text-card hover:bg-popover hover:text-primary-foreground sm:inline-flex"} > <Roll label={ctaLabel} /> <span aria-hidden="true" className="h-[4px] w-[4px] rounded-full bg-current" /> </button> <button type="button" onClick={onMenuClick} className={pill + " gap-4 bg-popover px-[22px] text-background hover:bg-foreground hover:text-card"} > <Roll label={menuLabel} /> <span aria-hidden="true" className="flex gap-[3px]"> <span className="h-[4px] w-[4px] rounded-full bg-current" /> <span className="h-[4px] w-[4px] rounded-full bg-current" /> </span> </button> </div> </div> </header> </div> ); }
Quality checks
Automated, in a real browser · today- 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: not passedElements must meet minimum color contrast ratio thresholds (1 element)
- 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.