{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "showcase-before-after",
  "type": "registry:component",
  "title": "Showcase Before After",
  "description": "A light redesign showcase: a browser frame holds the old and new screen, split by a draggable divider that also works with arrow keys. It sweeps once on load to hint that it moves, with result stats underneath.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "showcase",
    "before after",
    "redesign",
    "slider",
    "draggable",
    "mockup",
    "light"
  ],
  "docs": "https://hyperblur.dev/effects/showcase-before-after",
  "files": [
    {
      "path": "registry/hyperblur/showcase-before-after.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/showcase-before-after.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ShowcaseBeforeAfterStat {\n  value: string;\n  label: string;\n}\n\nexport interface ShowcaseBeforeAfterProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onChange\" | \"defaultValue\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  beforeLabel?: string;\n  afterLabel?: string;\n  value?: number;\n  defaultValue?: number;\n  onValueChange?: (value: number) => void;\n  intro?: boolean;\n  stats?: ShowcaseBeforeAfterStat[];\n  url?: string;\n  accent?: string;\n}\n\nconst css = `\n.hb-yh8 {\n  --hb-yh8-accent: #10b981;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  overflow: hidden;\n  padding: clamp(56px, 8cqi, 104px) 20px;\n  background: #f7f5ef;\n  color: #151515;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yh8 *, .hb-yh8 *::before, .hb-yh8 *::after { box-sizing: border-box; }\n.hb-yh8-in { position: relative; max-width: 1120px; margin: 0 auto; }\n.hb-yh8-head { max-width: 620px; margin: 0 auto 32px; text-align: center; }\n.hb-yh8-eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 11px; border: 1px solid rgba(0,0,0,.08); border-radius: 999px; background: #fff; color: #555; font-size: 12.5px; font-weight: 600; }\n.hb-yh8-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--hb-yh8-accent); }\n.hb-yh8-title { margin: 16px 0 0; font-size: clamp(30px, 4.4cqi, 46px); font-weight: 650; letter-spacing: -.035em; line-height: 1.06; }\n.hb-yh8-sub { margin: 12px auto 0; max-width: 500px; color: #6b6b6b; font-size: 15.5px; line-height: 1.6; }\n.hb-yh8-frame { position: relative; max-width: 1000px; margin: 0 auto; border: 1px solid rgba(0,0,0,.1); border-radius: 18px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 40px 80px -40px rgba(30,30,20,.35); overflow: hidden; }\n.hb-yh8-chrome { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-bottom: 1px solid rgba(0,0,0,.07); background: #fbfaf7; }\n.hb-yh8-chrome i { width: 10px; height: 10px; border-radius: 50%; background: #e5e2da; }\n.hb-yh8-url { flex: 1; max-width: 300px; height: 24px; margin: 0 auto; border-radius: 7px; background: #f0eee8; color: #8a8a8a; font-size: 11.5px; line-height: 24px; text-align: center; }\n.hb-yh8-stage { position: relative; height: 420px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }\n.hb-yh8-layer { position: absolute; inset: 0; overflow: hidden; }\n.hb-yh8-after { clip-path: inset(0 0 0 calc(var(--hb-yh8-p) * 1%)); }\n.hb-yh8-chip { position: absolute; z-index: 3; top: 14px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650; line-height: 26px; transition: opacity .25s ease; pointer-events: none; }\n.hb-yh8-chip[data-at=\"l\"] { left: 14px; background: rgba(40,40,40,.82); color: #fff; }\n.hb-yh8-chip[data-at=\"r\"] { right: 14px; background: var(--hb-yh8-accent); color: #fff; }\n.hb-yh8-div { position: absolute; z-index: 4; top: 0; bottom: 0; left: calc(var(--hb-yh8-p) * 1%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 0 24px rgba(0,0,0,.18); pointer-events: none; }\n.hb-yh8-handle {\n  position: absolute;\n  z-index: 5;\n  top: 50%;\n  left: calc(var(--hb-yh8-p) * 1%);\n  display: grid;\n  place-items: center;\n  width: 44px;\n  height: 44px;\n  margin: -22px 0 0 -22px;\n  padding: 0;\n  border: 0;\n  border-radius: 50%;\n  background: #fff;\n  color: #151515;\n  box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 8px 24px -6px rgba(0,0,0,.35);\n  cursor: grab;\n  transition: transform .2s cubic-bezier(.3,1.4,.5,1), box-shadow .2s ease;\n}\n.hb-yh8-handle:hover { transform: scale(1.08); }\n.hb-yh8[data-drag=\"true\"] .hb-yh8-handle { cursor: grabbing; transform: scale(.94); }\n.hb-yh8-handle:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-yh8-accent) 40%, transparent), 0 8px 24px -6px rgba(0,0,0,.35); }\n.hb-yh8-handle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }\n.hb-yh8-old { display: grid; grid-template-columns: 180px minmax(0, 1fr); height: 100%; background: #eceae6; color: #4a4a4a; font-size: 11px; }\n.hb-yh8-os { padding: 10px 8px; border-right: 1px solid #cfccc5; background: #dedbd4; }\n.hb-yh8-oi { height: 20px; margin-bottom: 3px; padding: 0 8px; border-radius: 3px; font-size: 10.5px; line-height: 20px; color: #555; }\n.hb-yh8-oi:nth-child(3) { background: #bdb9b0; color: #222; }\n.hb-yh8-om { padding: 10px 12px; overflow: hidden; }\n.hb-yh8-otb { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }\n.hb-yh8-ob { height: 22px; padding: 0 8px; border: 1px solid #b9b5ad; border-radius: 3px; background: linear-gradient(#fafafa, #dcd9d2); font-size: 10px; line-height: 20px; color: #333; }\n.hb-yh8-warn { margin-bottom: 8px; padding: 6px 10px; border: 1px solid #e3c86b; background: #fdf3c8; color: #6b5512; font-size: 10.5px; }\n.hb-yh8-flt { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }\n.hb-yh8-flt span { height: 22px; border: 1px solid #c4c0b8; background: #fff; padding: 0 6px; font-size: 10px; line-height: 20px; color: #777; }\n.hb-yh8-tbl { border: 1px solid #c4c0b8; background: #fff; }\n.hb-yh8-tr { display: grid; grid-template-columns: 22px 70px minmax(0, 1.4fr) repeat(5, minmax(0, 1fr)); border-top: 1px solid #e2dfd8; }\n.hb-yh8-tr:first-child { border-top: 0; background: #d6d3cc; font-weight: 700; }\n.hb-yh8-tr:nth-child(even) { background: #f6f5f2; }\n.hb-yh8-tr span { height: 23px; padding: 0 5px; border-left: 1px solid #e2dfd8; font-size: 10px; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-yh8-tr span:first-child { border-left: 0; }\n.hb-yh8-new { display: grid; grid-template-columns: 64px minmax(0, 1fr); height: 100%; background: #fff; }\n.hb-yh8-ns { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0; border-right: 1px solid rgba(0,0,0,.06); }\n.hb-yh8-ns i { width: 34px; height: 34px; border-radius: 10px; background: #f3f3f1; }\n.hb-yh8-ns i:first-child { background: #151515; }\n.hb-yh8-ns i:nth-child(2) { background: color-mix(in srgb, var(--hb-yh8-accent) 14%, #fff); box-shadow: inset 0 0 0 1.5px var(--hb-yh8-accent); }\n.hb-yh8-nm { padding: 24px 30px; overflow: hidden; }\n.hb-yh8-nh { display: flex; align-items: center; justify-content: space-between; }\n.hb-yh8-nt { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }\n.hb-yh8-nb { height: 34px; padding: 0 14px; border-radius: 999px; background: #151515; color: #fff; font-size: 12.5px; font-weight: 600; line-height: 34px; }\n.hb-yh8-ng { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 20px; }\n.hb-yh8-card { padding: 18px; border: 1px solid rgba(0,0,0,.07); border-radius: 16px; background: #fcfcfb; }\n.hb-yh8-ck { color: #7a7a7a; font-size: 12px; }\n.hb-yh8-cv { margin-top: 4px; font-size: 30px; font-weight: 700; letter-spacing: -.04em; }\n.hb-yh8-cv em { margin-left: 8px; color: var(--hb-yh8-accent); font-size: 13px; font-style: normal; font-weight: 650; letter-spacing: 0; }\n.hb-yh8-bars { display: flex; align-items: flex-end; gap: 7px; height: 120px; margin-top: 14px; }\n.hb-yh8-bars i { flex: 1; border-radius: 6px 6px 3px 3px; background: #ecebe7; }\n.hb-yh8-bars i:nth-child(n+9) { background: var(--hb-yh8-accent); }\n.hb-yh8-li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(0,0,0,.05); font-size: 12.5px; }\n.hb-yh8-li:first-of-type { border-top: 0; }\n.hb-yh8-av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 700; }\n.hb-yh8-li b { margin-left: auto; font-weight: 600; }\n.hb-yh8-pill { padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--hb-yh8-accent) 12%, #fff); color: color-mix(in srgb, var(--hb-yh8-accent) 80%, #000); font-size: 11px; font-weight: 600; }\n.hb-yh8-stats { display: grid; grid-template-columns: repeat(var(--hb-yh8-n), minmax(0, 1fr)); max-width: 1000px; margin: 22px auto 0; }\n.hb-yh8-st { padding: 6px 20px; border-left: 1px solid rgba(0,0,0,.08); }\n.hb-yh8-st:first-child { border-left: 0; }\n.hb-yh8-sv { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }\n.hb-yh8-sl { margin-top: 2px; color: #6b6b6b; font-size: 13px; }\n.hb-yh8-hint { margin: 14px 0 0; color: #8a8a8a; font-size: 12.5px; text-align: center; }\n@container (max-width: 760px) {\n  .hb-yh8-stage { height: 360px; }\n  .hb-yh8-old { grid-template-columns: 110px minmax(0, 1fr); }\n  .hb-yh8-tr { grid-template-columns: 18px 56px minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }\n  .hb-yh8-tr span:nth-child(n+7) { display: none; }\n  .hb-yh8-ng { grid-template-columns: minmax(0, 1fr); }\n  .hb-yh8-ng > :last-child { display: none; }\n  .hb-yh8-nm { padding: 18px; }\n  .hb-yh8-stats { grid-template-columns: minmax(0, 1fr); gap: 14px; }\n  .hb-yh8-st { border-left: 0; padding: 0; text-align: center; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yh8 *, .hb-yh8 *::before, .hb-yh8 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nconst defaultStats: ShowcaseBeforeAfterStat[] = [\n  { value: \"-62%\", label: \"Clicks to send an invoice\" },\n  { value: \"3.4x\", label: \"Faster first load\" },\n  { value: \"+41%\", label: \"Weekly active accountants\" },\n];\n\nconst oldRows = [\n  [\"INV-20931\", \"Hollis & Grant LLP\", \"$4,200.00\", \"Net 30\", \"Sent\", \"10/02\", \"JM\"],\n  [\"INV-20930\", \"Brightline Dental\", \"$1,180.00\", \"Net 15\", \"Overdue\", \"09/28\", \"AK\"],\n  [\"INV-20929\", \"Okafor Studio\", \"$860.00\", \"Due now\", \"Draft\", \"09/27\", \"JM\"],\n  [\"INV-20928\", \"Northgate Supply\", \"$12,940.00\", \"Net 45\", \"Paid\", \"09/25\", \"RS\"],\n  [\"INV-20927\", \"Pine & Co Bakery\", \"$318.50\", \"Net 15\", \"Paid\", \"09/24\", \"AK\"],\n  [\"INV-20926\", \"Vela Architects\", \"$7,600.00\", \"Net 30\", \"Sent\", \"09/22\", \"RS\"],\n  [\"INV-20925\", \"Marlow Fitness\", \"$540.00\", \"Net 15\", \"Paid\", \"09/21\", \"JM\"],\n  [\"INV-20924\", \"Quarry Labs\", \"$2,275.00\", \"Net 30\", \"Partial\", \"09/19\", \"AK\"],\n  [\"INV-20923\", \"Lumen Opticians\", \"$990.00\", \"Net 15\", \"Paid\", \"09/18\", \"RS\"],\n  [\"INV-20922\", \"Harbor Freight Co\", \"$3,410.00\", \"Net 30\", \"Paid\", \"09/16\", \"JM\"],\n];\n\nfunction OldUI() {\n  return (\n    <div className=\"hb-yh8-old\">\n      <div className=\"hb-yh8-os\">\n        {[\"Dashboard\", \"Customers\", \"Invoices\", \"Estimates\", \"Payments\", \"Items\", \"Taxes\", \"Reports\", \"Recurring\", \"Expenses\", \"Vendors\", \"Settings\", \"Users\", \"Import / Export\", \"Help\"].map((x) => (\n          <div key={x} className=\"hb-yh8-oi\">\n            {x}\n          </div>\n        ))}\n      </div>\n      <div className=\"hb-yh8-om\">\n        <div className=\"hb-yh8-otb\">\n          {[\"New\", \"Edit\", \"Duplicate\", \"Delete\", \"Print\", \"Email\", \"PDF\", \"Export CSV\", \"Mark paid\", \"Void\", \"Columns\", \"Refresh\"].map((x) => (\n            <span key={x} className=\"hb-yh8-ob\">\n              {x}\n            </span>\n          ))}\n        </div>\n        <div className=\"hb-yh8-warn\">Your session expires in 5 minutes. Save your work. Scheduled maintenance Sunday 02:00 to 06:00.</div>\n        <div className=\"hb-yh8-flt\">\n          {[\"Status: All\", \"Customer: All\", \"From: 09/01\", \"To: 10/31\", \"Owner: Any\"].map((x) => (\n            <span key={x}>{x}</span>\n          ))}\n        </div>\n        <div className=\"hb-yh8-tbl\">\n          <div className=\"hb-yh8-tr\">\n            {[\"\", \"Number\", \"Customer\", \"Amount\", \"Terms\", \"Status\", \"Date\", \"Owner\"].map((x, i) => (\n              <span key={i}>{x}</span>\n            ))}\n          </div>\n          {oldRows.map((r) => (\n            <div key={r[0]} className=\"hb-yh8-tr\">\n              <span>[ ]</span>\n              {r.map((c, i) => (\n                <span key={i}>{c}</span>\n              ))}\n            </div>\n          ))}\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction NewUI() {\n  const bars = [30, 42, 38, 50, 46, 58, 54, 62, 70, 66, 82, 94];\n  return (\n    <div className=\"hb-yh8-new\">\n      <div className=\"hb-yh8-ns\">\n        <i />\n        <i />\n        <i />\n        <i />\n        <i />\n      </div>\n      <div className=\"hb-yh8-nm\">\n        <div className=\"hb-yh8-nh\">\n          <div className=\"hb-yh8-nt\">Invoices</div>\n          <div className=\"hb-yh8-nb\">New invoice</div>\n        </div>\n        <div className=\"hb-yh8-ng\">\n          <div className=\"hb-yh8-card\">\n            <div className=\"hb-yh8-ck\">Collected in October</div>\n            <div className=\"hb-yh8-cv\">\n              $48,210<em>+18%</em>\n            </div>\n            <div className=\"hb-yh8-bars\">\n              {bars.map((h, i) => (\n                <i key={i} style={{ height: `${h}%` }} />\n              ))}\n            </div>\n          </div>\n          <div className=\"hb-yh8-card\">\n            <div className=\"hb-yh8-ck\">Needs attention</div>\n            {[\n              [\"Brightline Dental\", \"$1,180\", \"#f97316\", \"BD\"],\n              [\"Quarry Labs\", \"$2,275\", \"#6366f1\", \"QL\"],\n              [\"Okafor Studio\", \"$860\", \"#0ea5e9\", \"OS\"],\n              [\"Vela Architects\", \"$7,600\", \"#ec4899\", \"VA\"],\n            ].map(([n, a, c, ini], i) => (\n              <div key={n} className=\"hb-yh8-li\">\n                <span className=\"hb-yh8-av\" style={{ background: c }}>\n                  {ini}\n                </span>\n                {n}\n                {i === 0 ? <span className=\"hb-yh8-pill\">Remind</span> : null}\n                <b>{a}</b>\n              </div>\n            ))}\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport function ShowcaseBeforeAfter({\n  eyebrow = \"Ledgerly 3.0\",\n  title = \"We rebuilt invoicing from the ground up\",\n  subtitle = \"Drag the divider to compare the old screen with the new one. Same data, a fraction of the noise.\",\n  beforeLabel = \"Before, v2.8\",\n  afterLabel = \"After, v3.0\",\n  value,\n  defaultValue = 50,\n  onValueChange,\n  intro = true,\n  stats = defaultStats,\n  url = \"app.ledgerly.com/invoices\",\n  accent = \"#10b981\",\n  className = \"\",\n  style,\n  ...rest\n}: ShowcaseBeforeAfterProps) {\n  const [inner, setInner] = React.useState(defaultValue);\n  const [drag, setDrag] = React.useState(false);\n  const [introPos, setIntroPos] = React.useState<number | null>(null);\n  const touched = React.useRef(false);\n  const stageRef = React.useRef<HTMLDivElement>(null);\n  const base = value ?? inner;\n  const pos = introPos ?? base;\n\n  React.useEffect(() => {\n    if (!intro || value !== undefined) return;\n    if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n    const keys = [\n      [0, 0],\n      [0.32, -28],\n      [0.7, 24],\n      [1, 0],\n    ];\n    const dur = 2600;\n    let raf = 0;\n    let t0 = 0;\n    const start = window.setTimeout(() => {\n      const tick = (t: number) => {\n        if (touched.current) {\n          setIntroPos(null);\n          return;\n        }\n        if (!t0) t0 = t;\n        const k = Math.min(1, (t - t0) / dur);\n        let j = 0;\n        while (j < keys.length - 2 && k > keys[j + 1]![0]!) j++;\n        const [ka, va] = keys[j]!;\n        const [kb, vb] = keys[j + 1]!;\n        const u = (k - ka!) / (kb! - ka!);\n        const e = u < 0.5 ? 4 * u * u * u : 1 - Math.pow(-2 * u + 2, 3) / 2;\n        setIntroPos(defaultValue + va! + (vb! - va!) * e);\n        if (k < 1) raf = window.requestAnimationFrame(tick);\n        else setIntroPos(null);\n      };\n      raf = window.requestAnimationFrame(tick);\n    }, 700);\n    return () => {\n      window.clearTimeout(start);\n      window.cancelAnimationFrame(raf);\n    };\n  }, [intro, value, defaultValue]);\n\n  function set(v: number) {\n    const next = Math.max(0, Math.min(100, v));\n    touched.current = true;\n    setIntroPos(null);\n    if (value === undefined) setInner(next);\n    onValueChange?.(next);\n  }\n\n  function fromPointer(clientX: number) {\n    const el = stageRef.current;\n    if (!el) return;\n    const r = el.getBoundingClientRect();\n    if (r.width <= 0) return;\n    set(((clientX - r.left) / r.width) * 100);\n  }\n\n  function onDown(e: React.PointerEvent<HTMLDivElement>) {\n    if (e.button !== 0) return;\n    e.currentTarget.setPointerCapture(e.pointerId);\n    setDrag(true);\n    fromPointer(e.clientX);\n  }\n\n  function onKey(e: React.KeyboardEvent) {\n    const step = e.shiftKey ? 10 : 2;\n    if (e.key === \"ArrowLeft\" || e.key === \"ArrowDown\") set(base - step);\n    else if (e.key === \"ArrowRight\" || e.key === \"ArrowUp\") set(base + step);\n    else if (e.key === \"Home\") set(0);\n    else if (e.key === \"End\") set(100);\n    else if (e.key === \"PageDown\") set(base - 10);\n    else if (e.key === \"PageUp\") set(base + 10);\n    else return;\n    e.preventDefault();\n  }\n\n  return (\n    <section\n      className={`hb-yh8 ${className}`}\n      data-drag={drag ? \"true\" : \"false\"}\n      style={{ \"--hb-yh8-accent\": accent, \"--hb-yh8-n\": stats.length, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-showcase-before-after\" precedence=\"default\">\n        {css}\n      </style>\n      <div className=\"hb-yh8-in\">\n        <header className=\"hb-yh8-head\">\n          <span className=\"hb-yh8-eyebrow\">\n            <i aria-hidden=\"true\" />\n            {eyebrow}\n          </span>\n          <h2 className=\"hb-yh8-title\">{title}</h2>\n          {subtitle && <p className=\"hb-yh8-sub\">{subtitle}</p>}\n        </header>\n        <div className=\"hb-yh8-frame\">\n          <div className=\"hb-yh8-chrome\" aria-hidden=\"true\">\n            <i />\n            <i />\n            <i />\n            <span className=\"hb-yh8-url\">{url}</span>\n          </div>\n          <div\n            ref={stageRef}\n            className=\"hb-yh8-stage\"\n            style={{ \"--hb-yh8-p\": pos.toFixed(2) } as React.CSSProperties}\n            onPointerDown={onDown}\n            onPointerMove={(e) => drag && fromPointer(e.clientX)}\n            onPointerUp={() => setDrag(false)}\n            onPointerCancel={() => setDrag(false)}\n          >\n            <div className=\"hb-yh8-layer\" aria-hidden=\"true\">\n              <OldUI />\n            </div>\n            <div className=\"hb-yh8-layer hb-yh8-after\" aria-hidden=\"true\">\n              <NewUI />\n            </div>\n            <span className=\"hb-yh8-chip\" data-at=\"l\" style={{ opacity: pos < 14 ? 0 : 1 }}>\n              {beforeLabel}\n            </span>\n            <span className=\"hb-yh8-chip\" data-at=\"r\" style={{ opacity: pos > 86 ? 0 : 1 }}>\n              {afterLabel}\n            </span>\n            <span className=\"hb-yh8-div\" aria-hidden=\"true\" />\n            <button\n              type=\"button\"\n              role=\"slider\"\n              className=\"hb-yh8-handle\"\n              aria-label={`Compare ${beforeLabel} and ${afterLabel}`}\n              aria-valuemin={0}\n              aria-valuemax={100}\n              aria-valuenow={Math.round(base)}\n              aria-valuetext={`${Math.round(100 - base)}% of the new design visible`}\n              onKeyDown={onKey}\n            >\n              <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n                <path d=\"M7.5 5.5 3 10l4.5 4.5M12.5 5.5 17 10l-4.5 4.5\" />\n              </svg>\n            </button>\n          </div>\n        </div>\n        {stats.length > 0 && (\n          <div className=\"hb-yh8-stats\">\n            {stats.map((s) => (\n              <div key={s.label} className=\"hb-yh8-st\">\n                <div className=\"hb-yh8-sv\">{s.value}</div>\n                <div className=\"hb-yh8-sl\">{s.label}</div>\n              </div>\n            ))}\n          </div>\n        )}\n        <p className=\"hb-yh8-hint\">Drag the handle or use the arrow keys. Hold Shift for bigger steps.</p>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}