Buttons & actions / Buttons

Menu Pill Button

Light grey-blue pill with the MENU label and a two-dot glyph, sitting at the far right of the header.

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

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

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

Usage

Props: label (default "Menu"), onToggle(open) fired on click so you can show your navigation overlay, and className. Hover rolls the label, darkens the pill and pulls the dots together; click morphs the dots into a close cross.

components/menu-pill-button.tsx
import { useState } from "react";

type Props = {
  label?: string;
  onToggle?: (open: boolean) => void;
  className?: string;
};

export default function MenuPillButton({ label = "Menu", onToggle, className = "" }: Props) {
  const [open, setOpen] = useState(false);

  return (
    <button
      type="button"
      aria-expanded={open}
      aria-haspopup="dialog"
      onClick={() => {
        const next = !open;
        setOpen(next);
        onToggle?.(next);
      }}
      className={`group inline-flex h-[45px] items-center gap-3 rounded-pill bg-canvas-deep px-6 font-sans text-label uppercase text-ink transition-colors duration-standard ease-standard hover:bg-slate hover:text-paper focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-electric-blue ${className}`}
    >
      <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">{label}</span>
        <span aria-hidden="true" className="absolute left-0 top-full block transition-transform duration-standard ease-standard group-hover:-translate-y-full">{label}</span>
      </span>
      <span aria-hidden="true" className="relative flex h-3 w-4 items-center justify-center">
        <span className={`absolute h-[5px] w-[5px] rounded-circle bg-current transition-transform duration-standard ease-standard ${open ? "translate-x-0 rotate-45 scale-x-[2.2] scale-y-[0.3]" : "-translate-x-[5px] group-hover:-translate-x-[3px] group-hover:scale-75"}`} />
        <span className={`absolute h-[5px] w-[5px] rounded-circle bg-current transition-transform duration-standard ease-standard ${open ? "translate-x-0 -rotate-45 scale-x-[2.2] scale-y-[0.3]" : "translate-x-[5px] group-hover:translate-x-[3px] group-hover:scale-75"}`} />
      </span>
    </button>
  );
}

Quality checks

Automated, in a real browser · today
—

More from Periwinkle Studio Float

The whole style →

Tilted Panel Loader

Animated graphics

Floating Pill Header

Headers & nav bars

Oversized Section Heading with Side Blurb

Feature sections

Rounded Project Tile

Cards

Dot-Separated Category Tags

Badges & tags

Plus Crosshair Grid Markers

Animated backgrounds