{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"taffy-pill-nav","type":"registry:component","title":"Taffy Pill Nav","description":"A floating pill nav whose bubblegum marker stretches like taffy to the link you choose: long and thin in flight, short and fat as it lands, with the labels turning paper exactly where it covers them.","dependencies":[],"registryDependencies":[],"files":[{"path":"components/viberdy/taffy-pill-nav.tsx","content":"\"use client\";\n\nimport { useEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { CSSProperties, KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent, ReactNode, RefObject } from \"react\";\n\n/**\n * TaffyPillNav — a floating pill nav whose bubblegum marker stretches like taffy.\n *\n * The marker's two ends run on two springs, the leading end quick and the\n * trailing end slow, so it stretches long and thin as it travels (area\n * kept) and squashes short and fat as it lands. The labels turn paper\n * exactly where the marker covers them. Controlled or uncontrolled.\n *\n * Part of the Tactile Maximalism kit: dough #f7f0e4, warm ink #17130f and\n * one loud accent, bubblegum #ff2d78, filled once per screen; grain fixed to\n * the material; soft shadows tinted by what casts them, never a hard offset.\n * Everything soft keeps its area as it squashes and settles inside 450ms.\n * Unbounded through var(--font-unbounded) for display over Geist. Respects\n * prefers-reduced-motion. No dependencies beyond React. Paste it as its own\n * file: it repeats the kit's small helpers, which would clash in one module.\n * Load Unbounded with next/font (variable: \"--font-unbounded\") on a\n * parent, or from Google Fonts or @fontsource.\n * Needs Tailwind v4 (on v3.4, add the @tailwindcss/container-queries plugin).\n */\n\nconst SANS = 'var(--font-sans, \"Geist\", \"Inter\", ui-sans-serif, system-ui, sans-serif)';\n\nconst DISPLAY = 'var(--font-unbounded, \"Unbounded\", var(--font-sans, \"Geist\"), ui-sans-serif, system-ui, sans-serif)';\n\n/** Dough, warm ink, and one loud accent. */\nconst DOUGH = {\n  ground: \"#f7f0e4\",\n  surface: \"#fffaf1\",\n  well: \"#efe5d3\",\n  solid: \"#17130f\",\n  ink: \"rgba(23,19,15,0.92)\",\n  ink2: \"rgba(23,19,15,0.64)\",\n  ink3: \"rgba(23,19,15,0.42)\",\n  line: \"rgba(23,19,15,0.1)\",\n  line2: \"rgba(23,19,15,0.18)\",\n  gum: \"#ff2d78\",\n  gumDeep: \"#d8155d\",\n  lilac: \"#e8e1f6\",\n} as const;\n\n/** A soft object resting in dough: a tight contact shadow and a wide one tinted by the object. */\nfunction softShadow(tint = \"23,19,15\", lift = 1): string {\n  return `0 ${(2 * lift).toFixed(1)}px ${(6 * lift).toFixed(1)}px rgba(23,19,15,0.1), 0 ${(18 * lift).toFixed(1)}px ${(40 * lift).toFixed(1)}px -8px rgba(${tint},${(0.2 * Math.min(1, lift)).toFixed(3)})`;\n}\n\n/** Pressed into the dough: both shadows collapse to one tight line. */\nconst PRESSED_SHADOW = \"0 1px 3px rgba(23,19,15,0.14)\";\n\nfunction clamp(v: number, lo: number, hi: number): number {\n  return v < lo ? lo : v > hi ? hi : v;\n}\n\n/** Links: strip tabs and newlines, refuse backslashes, allow http(s), mailto, tel and same-site paths. */\nfunction safeHref(raw: string): string {\n  const v = raw.replace(/[\\t\\n\\r]/g, \"\").trim();\n  if (!v || v.includes(\"\\\\\")) return \"#\";\n  if (/^(https?:|mailto:|tel:)/i.test(v)) return v;\n  if (/^[/#?]/.test(v) && !/^\\/\\//.test(v)) return v;\n  return \"#\";\n}\n\nfunction subscribeMotion(cb: () => void) {\n  const m = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n  m.addEventListener(\"change\", cb);\n  return () => m.removeEventListener(\"change\", cb);\n}\n\n/** True when the visitor asked for reduced motion. False on the server. */\nfunction useReducedMotion(): boolean {\n  return useSyncExternalStore(\n    subscribeMotion,\n    () => window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches,\n    () => false,\n  );\n}\n\n/**\n * Squash and stretch for one element, on a spring. `press(depth)` squashes it\n * onto its foot with its area kept (as short as it gets, it gets as wide);\n * `release()` lets it spring back past rest, one visible overshoot, settled\n * inside 450ms; `flick(v)` gives it a sideways jiggle (a skew) from a push.\n * The transform is written straight to the element; nothing re-renders.\n */\nfunction useSquish(ref: RefObject<HTMLElement | null>, origin = \"50% 100%\") {\n  const reduced = useReducedMotion();\n  const st = useRef({ y: 1, v: 0, t: 1, sk: 0, skv: 0, raf: 0, last: 0 });\n  const tickRef = useRef<(now: number) => void>(() => undefined);\n  useEffect(() => {\n    const s = st.current;\n    const el = ref.current;\n    if (el) {\n      el.style.transformOrigin = origin;\n      // The spring owns the transform; a stylesheet's transition would smear it.\n      el.style.transitionProperty = el.style.transitionProperty && el.style.transitionProperty !== \"all\" ? el.style.transitionProperty : \"none\";\n    }\n    tickRef.current = (now: number) => {\n      s.raf = 0;\n      const dt = s.last ? Math.min(1 / 30, (now - s.last) / 1000) : 1 / 60;\n      s.last = now;\n      // k 420, c 18: one overshoot of about 20%, settled inside ~440ms.\n      for (let i = 0; i < 3; i++) {\n        const h = dt / 3;\n        s.v += (420 * (s.t - s.y) - 18 * s.v) * h;\n        s.y += s.v * h;\n        s.skv += (-380 * s.sk - 20 * s.skv) * h;\n        s.sk += s.skv * h;\n      }\n      const e = ref.current;\n      const y = clamp(s.y, 0.5, 1.6);\n      if (e) e.style.transform = `scale(${(1 / y).toFixed(4)}, ${y.toFixed(4)}) skewX(${s.sk.toFixed(3)}deg)`;\n      const moving = Math.abs(s.v) > 0.002 || Math.abs(s.y - s.t) > 0.0015 || Math.abs(s.sk) > 0.02 || Math.abs(s.skv) > 0.05;\n      if (moving) s.raf = requestAnimationFrame((t) => tickRef.current(t));\n      else {\n        s.last = 0;\n        if (e && s.t === 1) {\n          s.y = 1;\n          s.sk = 0;\n          e.style.transform = \"\";\n        }\n      }\n    };\n    return () => {\n      cancelAnimationFrame(s.raf);\n      s.raf = 0;\n      s.last = 0;\n    };\n  }, [ref, origin]);\n  const kick = () => {\n    const s = st.current;\n    if (!s.raf) s.raf = requestAnimationFrame((t) => tickRef.current(t));\n  };\n  return {\n    press: (depth = 0.86) => {\n      if (reduced) return;\n      st.current.t = clamp(depth, 0.6, 1);\n      kick();\n    },\n    release: () => {\n      st.current.t = 1;\n      if (!reduced) kick();\n    },\n    flick: (v: number) => {\n      if (reduced) return;\n      st.current.skv += clamp(v, -1, 1) * 160;\n      kick();\n    },\n  };\n}\n\n// Each part carries only the CSS it needs, so any one of them works on its own.\n// revert-layer keeps an element's own rounded corners when a host page's focus rule flattens them.\nconst FOCUS_CSS = \".tm-scope :focus-visible,.tm-scope:focus-visible{outline:2.5px solid var(--tm-ring,#17130f)!important;outline-offset:3px;border-radius:revert-layer}\";\n\nconst TM_BUTTON_INK = {\n  gum: { bg: DOUGH.gum, fg: \"#fffaf1\", tint: \"255,45,120\", border: \"transparent\" },\n  ink: { bg: DOUGH.solid, fg: \"#fffaf1\", tint: \"23,19,15\", border: \"transparent\" },\n  soft: { bg: DOUGH.surface, fg: DOUGH.solid, tint: \"23,19,15\", border: \"rgba(23,19,15,0.1)\" },\n} as const;\n\nexport type TmButtonVariant = keyof typeof TM_BUTTON_INK;\n\n/**\n * SquashPressButton — a pill that squashes under your finger and pops back.\n *\n * Press and it squashes onto its base where you pressed, its area kept (as it\n * gets shorter it gets wider); hold and it sinks further, up to a deep press\n * at 600ms; let go and it springs back past rest, one overshoot, settled\n * inside 450ms. Its two shadows (a contact and a wide one tinted by the pill's\n * own colour) collapse to one tight line while pressed. Swipe across it and it\n * jiggles the way you pushed it. Gum, ink and soft; a link when given an href.\n */\nexport function SquashPressButton({\n  children,\n  href,\n  onClick,\n  type = \"button\",\n  variant = \"ink\",\n  size = \"lg\",\n  disabled = false,\n  ariaLabel,\n  className = \"\",\n}: {\n  children: ReactNode;\n  href?: string;\n  onClick?: () => void;\n  type?: \"button\" | \"submit\";\n  variant?: TmButtonVariant;\n  size?: \"lg\" | \"md\" | \"sm\";\n  disabled?: boolean;\n  ariaLabel?: string;\n  className?: string;\n}) {\n  const ink = TM_BUTTON_INK[variant] ?? TM_BUTTON_INK.ink;\n  const bodyRef = useRef<HTMLSpanElement>(null);\n  const squish = useSquish(bodyRef);\n  const [state, setState] = useState<\"rest\" | \"hover\" | \"down\">(\"rest\");\n  const hold = useRef({ t0: 0, raf: 0, x: 0, t: 0 });\n\n  // Holding sinks it further: 0.9 at the press, 0.8 by 600ms.\n  useEffect(() => {\n    const h = hold.current;\n    return () => {\n      cancelAnimationFrame(h.raf);\n      h.raf = 0;\n    };\n  }, []);\n  const deepen = () => {\n    const h = hold.current;\n    const run = (now: number) => {\n      h.raf = 0;\n      const k = clamp((now - h.t0) / 600, 0, 1);\n      squish.press(0.9 - 0.1 * k);\n      if (k < 1) h.raf = requestAnimationFrame(run);\n    };\n    cancelAnimationFrame(h.raf);\n    h.raf = requestAnimationFrame(run);\n  };\n  const down = (xPct: number) => {\n    // It squashes onto its base under your finger, not about its middle.\n    if (bodyRef.current) bodyRef.current.style.transformOrigin = `${clamp(xPct, 15, 85).toFixed(0)}% 100%`;\n    setState(\"down\");\n    hold.current.t0 = performance.now();\n    squish.press(0.9);\n    deepen();\n  };\n  const up = (to: \"rest\" | \"hover\") => {\n    cancelAnimationFrame(hold.current.raf);\n    hold.current.raf = 0;\n    setState(to);\n    squish.release();\n  };\n\n  const pad = size === \"sm\" ? \"h-9 px-4 text-[12.5px]\" : size === \"md\" ? \"h-11 px-5 text-[13.5px]\" : \"h-14 px-7 text-[15px]\";\n  const shadow = state === \"down\" ? PRESSED_SHADOW : softShadow(ink.tint, state === \"hover\" ? 1.3 : 1);\n  const handlers = {\n    \"aria-label\": ariaLabel,\n    className: \"tm-scope group relative inline-flex select-none rounded-full no-underline outline-none \" + (disabled ? \"pointer-events-none opacity-40 \" : \"\") + className,\n    style: { WebkitTapHighlightColor: \"transparent\", touchAction: \"manipulation\" } as CSSProperties,\n    onPointerEnter: (e: ReactPointerEvent<HTMLElement>) => {\n      setState(\"hover\");\n      hold.current.x = e.clientX;\n      hold.current.t = performance.now();\n    },\n    onPointerMove: (e: ReactPointerEvent<HTMLElement>) => {\n      hold.current.x = e.clientX;\n      hold.current.t = performance.now();\n    },\n    onPointerLeave: (e: ReactPointerEvent<HTMLElement>) => {\n      const dt = Math.max(8, performance.now() - hold.current.t);\n      // A quick swipe out leaves it jiggling the way it was pushed.\n      squish.flick(((e.clientX - hold.current.x) / dt) * 0.6);\n      up(\"rest\");\n    },\n    onPointerDown: (e: ReactPointerEvent<HTMLElement>) => {\n      if (e.button !== 0) return;\n      const r = e.currentTarget.getBoundingClientRect();\n      down(((e.clientX - r.left) / Math.max(1, r.width)) * 100);\n    },\n    onPointerUp: () => up(\"hover\"),\n    onPointerCancel: () => up(\"rest\"),\n    onKeyDown: (e: ReactKeyboardEvent<HTMLElement>) => {\n      if (e.repeat) return;\n      if (e.key === \"Enter\" || (e.key === \" \" && !href)) down(50);\n    },\n    onKeyUp: () => {\n      if (state === \"down\") up(\"rest\");\n    },\n    onBlur: () => {\n      if (state === \"down\") up(\"rest\");\n    },\n  };\n  // The pill that squashes and its shadow live on an inner span, so the hit area never moves.\n  const pill = (\n    <span\n      ref={bodyRef}\n      className={\"relative inline-flex items-center justify-center rounded-full \" + pad}\n      style={{\n        background: ink.bg,\n        color: ink.fg,\n        border: `1px solid ${ink.border}`,\n        boxShadow: shadow,\n        fontFamily: DISPLAY,\n        fontWeight: 600,\n        letterSpacing: \"-0.01em\",\n        transition: \"box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1)\",\n        willChange: \"transform\",\n      }}\n    >\n      <span className=\"whitespace-nowrap\">{children}</span>\n    </span>\n  );\n  if (href) {\n    return (\n      <>\n        <style>{FOCUS_CSS}</style>\n        <a href={safeHref(href)} onClick={onClick} {...handlers}>\n          {pill}\n        </a>\n      </>\n    );\n  }\n  return (\n    <>\n      <style>{FOCUS_CSS}</style>\n      <button type={type} onClick={onClick} disabled={disabled} {...handlers}>\n        {pill}\n      </button>\n    </>\n  );\n}\n\nexport type TmLink = { label: string; href: string };\n\n/**\n * TaffyPillNav — a floating pill nav whose bubblegum marker stretches like\n * taffy to the link you choose.\n *\n * The marker's two ends run on two springs: the leading end quick, the\n * trailing end slower, so it stretches long and thin as it travels (its area\n * kept: the longer, the thinner) and, when the leading end lands and the tail\n * catches up, it squashes short and fat before it settles. The labels turn\n * paper exactly where the marker covers them, mid-flight too. Arrow keys move\n * between links; the current one is marked for screen readers.\n */\nexport function TaffyPillNav({\n  brand = \"plushdrop\",\n  links = [\n    { label: \"Drops\", href: \"#drops\" },\n    { label: \"How it works\", href: \"#how\" },\n    { label: \"Artists\", href: \"#artists\" },\n    { label: \"Pricing\", href: \"#pricing\" },\n  ],\n  defaultActive = 0,\n  active: activeProp,\n  onChange,\n  cta = { label: \"Start a drop\", href: \"#\" },\n  ctaShort = \"Start\",\n  className = \"\",\n  style,\n}: {\n  brand?: string;\n  links?: TmLink[];\n  defaultActive?: number;\n  /** Controlled: which link is current. */\n  active?: number;\n  onChange?: (index: number) => void;\n  cta?: TmLink;\n  /** The CTA's label on a narrow bar (the full label is its accessible name). */\n  ctaShort?: string;\n  className?: string;\n  style?: CSSProperties;\n}) {\n  const [own, setOwn] = useState(defaultActive);\n  const active = clamp(activeProp ?? own, 0, Math.max(0, links.length - 1));\n  const rowRef = useRef<HTMLDivElement>(null);\n  const pillRef = useRef<HTMLSpanElement>(null);\n  const paperRef = useRef<HTMLDivElement>(null);\n  const linkRefs = useRef<(HTMLAnchorElement | null)[]>([]);\n  const reduced = useReducedMotion();\n  const sim = useRef({ l: 0, r: 0, vl: 0, vr: 0, tl: 0, tr: 0, h: 0, ready: false, raf: 0, last: 0 });\n  const tickRef = useRef<(now: number) => void>(() => undefined);\n\n  useEffect(() => {\n    const st = sim.current;\n    const paint = () => {\n      const w = Math.max(1, st.r - st.l);\n      const rest = Math.max(1, st.tr - st.tl);\n      // Area kept: stretched long it gets thin, squashed short it gets fat.\n      const h = clamp(st.h * Math.sqrt(rest / w), st.h * 0.62, st.h * 1.22);\n      const top = (rowRef.current?.clientHeight ?? st.h) / 2 - h / 2;\n      const p = pillRef.current;\n      if (p) {\n        p.style.transform = `translate(${st.l.toFixed(2)}px, ${top.toFixed(2)}px)`;\n        p.style.width = `${w.toFixed(2)}px`;\n        p.style.height = `${h.toFixed(2)}px`;\n      }\n      const row = rowRef.current;\n      const paper = paperRef.current;\n      if (paper && row) paper.style.clipPath = `inset(${top.toFixed(2)}px ${(row.clientWidth - st.r).toFixed(2)}px ${(row.clientHeight - top - h).toFixed(2)}px ${st.l.toFixed(2)}px round ${(h / 2).toFixed(2)}px)`;\n    };\n    tickRef.current = (now: number) => {\n      st.raf = 0;\n      const dt = st.last ? Math.min(1 / 30, (now - st.last) / 1000) : 1 / 60;\n      st.last = now;\n      const right = st.tl > st.l;\n      for (let i = 0; i < 3; i++) {\n        const h = dt / 3;\n        // Leading end k 420 c 30, trailing end k 170 c 20.\n        const [kl, cl] = right ? [170, 20] : [420, 30];\n        const [kr, cr] = right ? [420, 30] : [170, 20];\n        st.vl += (kl * (st.tl - st.l) - cl * st.vl) * h;\n        st.vr += (kr * (st.tr - st.r) - cr * st.vr) * h;\n        st.l += st.vl * h;\n        st.r += st.vr * h;\n      }\n      paint();\n      const moving = Math.abs(st.vl) + Math.abs(st.vr) > 0.05 || Math.abs(st.tl - st.l) + Math.abs(st.tr - st.r) > 0.1;\n      if (moving) st.raf = requestAnimationFrame((n) => tickRef.current(n));\n      else {\n        st.last = 0;\n        st.l = st.tl;\n        st.r = st.tr;\n        paint();\n      }\n    };\n    const measure = () => {\n      const a = linkRefs.current[active];\n      const row = rowRef.current;\n      if (!a || !row) return;\n      st.tl = a.offsetLeft;\n      st.tr = a.offsetLeft + a.offsetWidth;\n      st.h = a.offsetHeight;\n      // The first time (and without motion) it simply appears where it belongs.\n      if (!st.ready || reduced) {\n        st.l = st.tl;\n        st.r = st.tr;\n        st.vl = st.vr = 0;\n        st.ready = true;\n        paint();\n        return;\n      }\n      if (!st.raf) st.raf = requestAnimationFrame((n) => tickRef.current(n));\n    };\n    measure();\n    const ro = new ResizeObserver(() => {\n      st.ready = false;\n      measure();\n    });\n    if (rowRef.current) ro.observe(rowRef.current);\n    return () => {\n      ro.disconnect();\n      cancelAnimationFrame(st.raf);\n      st.raf = 0;\n      st.last = 0;\n    };\n  }, [active, reduced, links.length]);\n\n  const choose = (i: number) => {\n    if (activeProp === undefined) setOwn(i);\n    onChange?.(i);\n  };\n  const onKey = (e: ReactKeyboardEvent<HTMLAnchorElement>, i: number) => {\n    const n = links.length;\n    const next = e.key === \"ArrowRight\" ? (i + 1) % n : e.key === \"ArrowLeft\" ? (i - 1 + n) % n : e.key === \"Home\" ? 0 : e.key === \"End\" ? n - 1 : -1;\n    if (next < 0) return;\n    e.preventDefault();\n    linkRefs.current[next]?.focus();\n  };\n  const label = \"relative inline-flex h-10 items-center whitespace-nowrap rounded-full px-4 text-[14px] no-underline\";\n\n  return (\n    <nav aria-label=\"Main\" className={\"tm-scope relative w-full @container \" + className} style={{ fontFamily: SANS, ...style }}>\n      <style>{FOCUS_CSS}</style>\n      <div className=\"flex items-center gap-3 rounded-full py-2 pl-5 pr-2\" style={{ background: DOUGH.surface, boxShadow: softShadow(), border: `1px solid ${DOUGH.line}` }}>\n        <a href=\"#\" className=\"shrink-0 text-[17px] no-underline\" style={{ fontFamily: DISPLAY, fontWeight: 800, letterSpacing: \"-0.04em\", color: DOUGH.solid }}>\n          {brand}\n          <span style={{ color: DOUGH.gum }}>.</span>\n        </a>\n        {/* On a narrow bar the links scroll; the fades at the edges say so. */}\n        <div className=\"relative mx-auto min-w-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\" style={{ maskImage: \"linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%)\", WebkitMaskImage: \"linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%)\" }}>\n          <div ref={rowRef} className=\"relative flex items-center\">\n            <span ref={pillRef} aria-hidden className=\"pointer-events-none absolute left-0 top-0 block rounded-full\" style={{ background: DOUGH.gum, boxShadow: \"0 6px 16px -6px rgba(216,21,93,0.5)\", transition: \"none\" }} />\n            {links.map((l, i) => (\n              <a\n                key={l.label}\n                ref={(el) => void (linkRefs.current[i] = el)}\n                href={safeHref(l.href)}\n                aria-current={i === active ? \"page\" : undefined}\n                onClick={() => choose(i)}\n                onKeyDown={(e) => onKey(e, i)}\n                className={label}\n                style={{ color: DOUGH.ink }}\n              >\n                {l.label}\n              </a>\n            ))}\n            {/* The same labels in paper, shown only where the marker is. */}\n            <div ref={paperRef} aria-hidden className=\"pointer-events-none absolute inset-0 flex items-center\" style={{ transition: \"none\" }}>\n              {links.map((l) => (\n                <span key={l.label} className={label} style={{ color: \"#fffaf1\" }}>\n                  {l.label}\n                </span>\n              ))}\n            </div>\n          </div>\n        </div>\n        <div className=\"hidden shrink-0 @2xl:block\">\n          <SquashPressButton href={cta.href} size=\"sm\" variant=\"ink\">\n            {cta.label}\n          </SquashPressButton>\n        </div>\n        <div className=\"shrink-0 @2xl:hidden\">\n          <SquashPressButton href={cta.href} size=\"sm\" variant=\"ink\" ariaLabel={cta.label}>\n            {ctaShort}\n          </SquashPressButton>\n        </div>\n      </div>\n    </nav>\n  );\n}\n","type":"registry:component","target":"components/viberdy/taffy-pill-nav.tsx"}],"meta":{"tier":"free","tags":["navigation","navbar","indicator","spring","squash and stretch","pill"],"href":"https://viberdy.dev/library/taffy-pill-nav","aiPrompt":"Build a React + Tailwind nav, `TaffyPillNav({ brand, links, defaultActive, active, onChange, cta, ctaShort, className, style })`.\n\nTactile Maximalism grammar: loud but composed. A dough ground #f7f0e4 over most of the page (surfaces #fffaf1, a pressed well #efe5d3), warm ink #17130f at 92/64/42%, hairlines at 10% and 18%; ONE loud accent, bubblegum #ff2d78 (deep #d8155d), as a filled thing once per screen, and one quiet tint, lavender #e8e1f6, only on small chips, never a second loud colour. Grain at 4-6%, monochrome, static, fixed to the material. Depth is soft and tinted: a contact shadow 0 2px 6px rgba(23,19,15,0.1) plus a wide one 0 18px 40px -8px tinted by what casts it (a gum chip casts pink); pressed, both collapse to 0 1px 3px rgba(23,19,15,0.14). Never a hard offset shadow (that is neo-brutalism). Type: Unbounded at 800 through var(--font-unbounded, \"Unbounded\", ...) for one oversized headline per screen (up to ~15cqw, leading 0.92, tracking -0.045em), Geist for reading at 16-17px/1.5, Geist Mono uppercase at 11-12px for labels. Full pills for every control and chip, 28px cards, 20px nested media. Motion: everything soft keeps its area as it squashes (scaleX = 1 / scaleY about its foot), deforms in proportion to the input (where, how long, how fast), overshoots once and settles inside 450ms (a spring near k 420, c 18), and always returns to one legible rest shape. Reduced motion keeps the states and drops the springs.\n\nA floating pill bar (surface #fffaf1, 10% hairline, soft shadow): the brand in Unbounded 800 with a gum full stop, a row of 40px pill links (Geist 14px), and a small ink squash button (a short label, `ctaShort`, below @2xl, the full label its accessible name); the links scroll sideways on a narrow bar under 16px edge fades. Behind the links a bubblegum marker is positioned from two numbers, its left and right edges, each on a spring toward the current link's edges: the edge in the direction of travel k 420 c 30, the other k 170 c 20, three substeps a frame. Its height keeps its area: h = linkHeight * sqrt(restWidth / width), clamped to 0.62-1.22 of the link height, centred. Over the links, an aria-hidden copy of the labels in paper is clipped with clip-path: inset(...) round h/2 to the marker's box every frame. It appears in place on first render and on resize; controlled (active + onChange) or uncontrolled; arrow keys, Home and End move focus.","license":"https://viberdy.dev/license"}}