Slate Pill CTA
Fully rounded dark slate (#2b2e3a) button with small uppercase white label and a trailing dot, about 134×45.
Rebuilt from lusion.co in the Periwinkle Studio Float style.
npx shadcn@latest add https://justyoink.it/r/periwinkle-studio-float/blocks/slate-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/slate-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 "Let's talk"), href (renders an anchor if given, otherwise a button), onClick, className. On hover or focus the label rolls up to a duplicate and the trailing dot turns into an arrow, with a 0.4s background shift.
components/slate-pill-button.tsx
import { useState } from "react"; type Props = { label?: string; href?: string; onClick?: () => void; className?: string; }; export default function SlatePillCta({ label = "Let's talk", href, onClick, className = "" }: Props) { const [active, setActive] = useState(false); const base = "group relative inline-flex h-[45px] min-w-[134px] items-center justify-between gap-4 rounded-pill bg-slate px-[22px] text-paper transition-colors duration-[400ms] ease-standard hover:bg-ink focus-visible:bg-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-electric-blue " + className; const inner = ( <> <span className="relative block h-[1.2em] overflow-hidden text-[12px] font-medium uppercase leading-[1.2] tracking-[0.01em]"> <span className={"block transition-transform duration-[400ms] ease-[cubic-bezier(0.19,1,0.22,1)] group-hover:-translate-y-full group-focus-visible:-translate-y-full " + (active ? "-translate-y-full" : "")} > {label} </span> <span aria-hidden="true" className={"absolute left-0 top-full block whitespace-nowrap transition-transform duration-[400ms] ease-[cubic-bezier(0.19,1,0.22,1)] group-hover:-translate-y-full group-focus-visible:-translate-y-full " + (active ? "-translate-y-full" : "")} > {label} </span> </span> <span className="relative flex h-4 w-4 items-center justify-center overflow-hidden" aria-hidden="true"> <span className="absolute h-[4px] w-[4px] rounded-circle bg-paper transition-all duration-[400ms] ease-standard group-hover:scale-0 group-focus-visible:scale-0" /> <svg viewBox="0 0 16 16" className="absolute h-3.5 w-3.5 -translate-x-3 translate-y-0 scale-50 opacity-0 transition-all duration-[400ms] ease-standard group-hover:translate-x-0 group-hover:scale-100 group-hover:opacity-100 group-focus-visible:translate-x-0 group-focus-visible:scale-100 group-focus-visible:opacity-100" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" > <path d="M3 8h10M9 4l4 4-4 4" /> </svg> </span> </> ); const handlers = { onMouseEnter: () => setActive(true), onMouseLeave: () => setActive(false), onFocus: () => setActive(true), onBlur: () => setActive(false), }; if (href) { return ( <a href={href} className={base} {...handlers}> {inner} </a> ); } return ( <button type="button" onClick={onClick} className={base} {...handlers}> {inner} </button> ); }import { useState } from "react"; type Props = { label?: string; href?: string; onClick?: () => void; className?: string; }; export default function SlatePillCta({ label = "Let's talk", href, onClick, className = "" }: Props) { const [active, setActive] = useState(false); const base = "group relative inline-flex h-[45px] min-w-[134px] items-center justify-between gap-4 rounded-full bg-primary px-[22px] text-card transition-colors duration-[400ms] ease-periwinkle-standard hover:bg-primary focus-visible:bg-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-periwinkle-electric-blue " + className; const inner = ( <> <span className="relative block h-[1.2em] overflow-hidden text-[12px] font-medium uppercase leading-[1.2] tracking-[0.01em]"> <span className={"block transition-transform duration-[400ms] ease-[cubic-bezier(0.19,1,0.22,1)] group-hover:-translate-y-full group-focus-visible:-translate-y-full " + (active ? "-translate-y-full" : "")} > {label} </span> <span aria-hidden="true" className={"absolute left-0 top-full block whitespace-nowrap transition-transform duration-[400ms] ease-[cubic-bezier(0.19,1,0.22,1)] group-hover:-translate-y-full group-focus-visible:-translate-y-full " + (active ? "-translate-y-full" : "")} > {label} </span> </span> <span className="relative flex h-4 w-4 items-center justify-center overflow-hidden" aria-hidden="true"> <span className="absolute h-[4px] w-[4px] rounded-full bg-card transition-all duration-[400ms] ease-periwinkle-standard group-hover:scale-0 group-focus-visible:scale-0" /> <svg viewBox="0 0 16 16" className="absolute h-3.5 w-3.5 -translate-x-3 translate-y-0 scale-50 opacity-0 transition-all duration-[400ms] ease-periwinkle-standard group-hover:translate-x-0 group-hover:scale-100 group-hover:opacity-100 group-focus-visible:translate-x-0 group-focus-visible:scale-100 group-focus-visible:opacity-100" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" > <path d="M3 8h10M9 4l4 4-4 4" /> </svg> </span> </> ); const handlers = { onMouseEnter: () => setActive(true), onMouseLeave: () => setActive(false), onFocus: () => setActive(true), onBlur: () => setActive(false), }; if (href) { return ( <a href={href} className={base} {...handlers}> {inner} </a> ); } return ( <button type="button" onClick={onClick} className={base} {...handlers}> {inner} </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.