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.
npx shadcn@latest add https://justyoink.it/r/periwinkle-studio-float/mine/menu-pill-button.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: 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> ); }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-full bg-popover px-6 font-sans text-periwinkle-label uppercase text-primary-foreground transition-colors duration-periwinkle-standard ease-periwinkle-standard hover:bg-primary hover:text-card focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-periwinkle-electric-blue ${className}`} > <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">{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">{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-full bg-current transition-transform duration-periwinkle-standard ease-periwinkle-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-full bg-current transition-transform duration-periwinkle-standard ease-periwinkle-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- 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.