{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "comparison-versus",
  "type": "registry:component",
  "title": "Comparison Versus",
  "description": "A Before and After split with a spinning VS badge between two contrasting panels, and a metric strip whose bars grow to show the change.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "comparison",
    "comparison",
    "before after",
    "versus",
    "metrics",
    "split",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/comparison-versus",
  "files": [
    {
      "path": "registry/hyperblur/comparison-versus.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/comparison-versus.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface VersusSide {\n  label: string;\n  title: string;\n  points: string[];\n}\n\nexport interface VersusMetric {\n  label: string;\n  before: string;\n  after: string;\n  ratio: number;\n}\n\nexport interface ComparisonVersusProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  before?: VersusSide;\n  after?: VersusSide;\n  metrics?: VersusMetric[];\n  badge?: string;\n  accent?: string;\n}\n\nconst defaultBefore: VersusSide = {\n  label: \"Before\",\n  title: \"Shipping a launch page the old way\",\n  points: [\n    \"Copy lives in 14 docs and nobody knows which one is final\",\n    \"Every typo fix waits for a developer and a deploy\",\n    \"Translations are pasted by hand into six locales\",\n    \"Approvals happen in DMs and quietly get lost\",\n    \"Preview links break whenever the branch changes\",\n  ],\n};\n\nconst defaultAfter: VersusSide = {\n  label: \"After\",\n  title: \"Shipping it with Inkwell\",\n  points: [\n    \"One source of truth with history on every field\",\n    \"Editors publish in a click, developers keep their weekends\",\n    \"Locales sync automatically into review queues\",\n    \"Comments and sign-off live right next to the content\",\n    \"A stable preview link for every single draft\",\n  ],\n};\n\nconst defaultMetrics: VersusMetric[] = [\n  { label: \"Time to publish\", before: \"3 days\", after: \"20 min\", ratio: 0.08 },\n  { label: \"Tools in the stack\", before: \"9\", after: \"1\", ratio: 0.12 },\n  { label: \"Review rounds\", before: \"6\", after: \"2\", ratio: 0.33 },\n  { label: \"Monthly spend\", before: \"$1,840\", after: \"$390\", ratio: 0.21 },\n];\n\nconst css = `\n.hb-kc6 {\n  --hb-kc6-accent: #22d3ee;\n  --hb-kc6-bad: #f87171;\n  container-type: inline-size;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  isolation: isolate;\n  overflow: hidden;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kc6 *, .hb-kc6 *::before, .hb-kc6 *::after { box-sizing: border-box; }\n.hb-kc6::before {\n  content: \"\";\n  position: absolute;\n  right: -10%;\n  top: 10%;\n  z-index: -1;\n  width: 60%;\n  height: 80%;\n  background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-kc6-accent) 14%, transparent), transparent);\n  pointer-events: none;\n}\n.hb-kc6-inner { max-width: 1120px; margin: 0 auto; padding: 72px 18px 64px; }\n.hb-kc6-head { max-width: 640px; margin: 0 auto; text-align: center; }\n.hb-kc6-eyebrow { margin: 0 0 14px; color: #8f8f8f; font-size: 13px; font-weight: 550; letter-spacing: .06em; text-transform: uppercase; }\n.hb-kc6-title { margin: 0; font-size: clamp(30px, 5cqi, 48px); font-weight: 650; line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }\n.hb-kc6-title em { font-style: normal; color: var(--hb-kc6-accent); }\n.hb-kc6-sub { margin: 14px auto 0; max-width: 500px; color: #8f8f8f; font-size: 16px; line-height: 1.6; text-wrap: pretty; }\n.hb-kc6-split { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 44px; }\n.hb-kc6-panel {\n  position: relative;\n  padding: 26px 22px;\n  border-radius: 22px;\n  animation: hb-kc6-in .9s cubic-bezier(.2, .8, .2, 1) both;\n}\n.hb-kc6-panel[data-side=\"before\"] {\n  --hb-kc6-from: -24px;\n  border: 1px solid rgba(255, 255, 255, .07);\n  background:\n    repeating-linear-gradient(135deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 10px),\n    #0e0e0e;\n}\n.hb-kc6-panel[data-side=\"after\"] {\n  --hb-kc6-from: 24px;\n  border: 1px solid color-mix(in srgb, var(--hb-kc6-accent) 35%, transparent);\n  background:\n    radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--hb-kc6-accent) 16%, transparent), transparent 70%),\n    #0d1012;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 80px -40px color-mix(in srgb, var(--hb-kc6-accent) 70%, transparent);\n  animation-delay: .12s;\n}\n.hb-kc6-chip {\n  display: inline-flex;\n  align-items: center;\n  gap: 7px;\n  height: 26px;\n  padding: 0 11px;\n  border-radius: 999px;\n  font-size: 12px;\n  font-weight: 650;\n  letter-spacing: .03em;\n  text-transform: uppercase;\n}\n.hb-kc6-chip::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }\n.hb-kc6-panel[data-side=\"before\"] .hb-kc6-chip { background: rgba(255, 255, 255, .05); color: #8f8f8f; }\n.hb-kc6-panel[data-side=\"after\"] .hb-kc6-chip { background: color-mix(in srgb, var(--hb-kc6-accent) 16%, transparent); color: var(--hb-kc6-accent); }\n.hb-kc6-panel[data-side=\"after\"] .hb-kc6-chip::before { box-shadow: 0 0 10px currentColor; animation: hb-kc6-blink 2s ease-in-out infinite; }\n.hb-kc6-ptitle { margin: 16px 0 0; font-size: 20px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }\n.hb-kc6-panel[data-side=\"before\"] .hb-kc6-ptitle { color: #a1a1a1; }\n.hb-kc6-list { display: grid; gap: 4px; margin: 18px 0 0; padding: 0; list-style: none; }\n.hb-kc6-list li { display: flex; gap: 12px; padding: 9px 0; font-size: 14.5px; line-height: 1.45; }\n.hb-kc6-list li + li { border-top: 1px solid rgba(255, 255, 255, .05); }\n.hb-kc6-panel[data-side=\"before\"] .hb-kc6-list li { color: #8a8a8a; }\n.hb-kc6-panel[data-side=\"after\"] .hb-kc6-list li { color: #dcdcdc; }\n.hb-kc6-ico { display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; }\n.hb-kc6-ico svg { width: 10px; height: 10px; }\n.hb-kc6-panel[data-side=\"before\"] .hb-kc6-ico { background: color-mix(in srgb, var(--hb-kc6-bad) 12%, transparent); color: color-mix(in srgb, var(--hb-kc6-bad) 75%, #888); }\n.hb-kc6-panel[data-side=\"after\"] .hb-kc6-ico { background: color-mix(in srgb, var(--hb-kc6-accent) 18%, transparent); color: var(--hb-kc6-accent); }\n.hb-kc6-vs {\n  position: relative;\n  z-index: 2;\n  display: grid;\n  place-items: center;\n  justify-self: center;\n  align-self: center;\n  width: 64px;\n  height: 64px;\n  margin: -26px 0;\n  border-radius: 50%;\n  background: #0a0a0a;\n  color: #fff;\n  font-size: 15px;\n  font-weight: 800;\n  letter-spacing: .04em;\n  box-shadow: 0 0 0 6px #0a0a0a, 0 10px 30px rgba(0, 0, 0, .7);\n  animation: hb-kc6-pop .7s cubic-bezier(.3, 1.6, .5, 1) .35s both;\n}\n.hb-kc6-vs::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  border-radius: 50%;\n  background: conic-gradient(from 0deg, rgba(255, 255, 255, .08), var(--hb-kc6-accent), rgba(255, 255, 255, .08) 50%, var(--hb-kc6-bad), rgba(255, 255, 255, .08));\n  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));\n  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));\n  animation: hb-kc6-spin 6s linear infinite;\n}\n.hb-kc6-metrics {\n  display: grid;\n  grid-template-columns: repeat(2, minmax(0, 1fr));\n  margin: 20px 0 0;\n  padding: 0;\n  overflow: hidden;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 20px;\n  background: #0f0f0f;\n  list-style: none;\n}\n.hb-kc6-metric { padding: 18px 16px; box-shadow: -1px -1px 0 rgba(255, 255, 255, .07); }\n.hb-kc6-mlabel { margin: 0; color: #8f8f8f; font-size: 12.5px; }\n.hb-kc6-mvals { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 8px 0 0; }\n.hb-kc6-old { color: #6a6a6a; font-size: 14px; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--hb-kc6-bad) 60%, transparent); }\n.hb-kc6-arrow { width: 12px; height: 12px; color: #555; }\n.hb-kc6-new { color: #fff; font-size: 24px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }\n.hb-kc6-bars { display: grid; gap: 4px; margin-top: 12px; }\n.hb-kc6-bar { height: 4px; border-radius: 4px; transform-origin: left center; animation: hb-kc6-grow 1.1s cubic-bezier(.2, .8, .2, 1) both; }\n.hb-kc6-bar[data-k=\"before\"] { width: 100%; background: color-mix(in srgb, var(--hb-kc6-bad) 35%, #262626); animation-delay: .5s; }\n.hb-kc6-bar[data-k=\"after\"] { width: var(--hb-kc6-r); min-width: 6px; background: var(--hb-kc6-accent); box-shadow: 0 0 10px color-mix(in srgb, var(--hb-kc6-accent) 70%, transparent); animation-delay: .8s; }\n.hb-kc6-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n}\n@keyframes hb-kc6-in {\n  from { opacity: 0; transform: translateX(var(--hb-kc6-from)); }\n  to { opacity: 1; transform: none; }\n}\n@keyframes hb-kc6-pop {\n  from { opacity: 0; transform: scale(.4) rotate(-20deg); }\n  to { opacity: 1; transform: none; }\n}\n@keyframes hb-kc6-spin { to { transform: rotate(360deg); } }\n@keyframes hb-kc6-blink { 50% { opacity: .35; } }\n@keyframes hb-kc6-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n@container (min-width: 760px) {\n  .hb-kc6-inner { padding: 100px 32px 88px; }\n  .hb-kc6-split { grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr); column-gap: 24px; margin-top: 56px; }\n  .hb-kc6-panel { padding: 32px 32px 28px; }\n  .hb-kc6-vs { width: 72px; height: 72px; margin: 0 -36px; font-size: 16px; }\n  .hb-kc6-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }\n  .hb-kc6-metric { padding: 22px 24px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kc6-panel, .hb-kc6-vs, .hb-kc6-bar { animation: none; }\n  .hb-kc6-vs::before, .hb-kc6-panel[data-side=\"after\"] .hb-kc6-chip::before { animation: none; }\n}\n`;\n\nfunction Side({ side, data }: { side: \"before\" | \"after\"; data: VersusSide }) {\n  return (\n    <div className=\"hb-kc6-panel\" data-side={side}>\n      <span className=\"hb-kc6-chip\">{data.label}</span>\n      <h3 className=\"hb-kc6-ptitle\">{data.title}</h3>\n      <ul className=\"hb-kc6-list\">\n        {data.points.map((p) => (\n          <li key={p}>\n            <span className=\"hb-kc6-ico\" aria-hidden=\"true\">\n              {side === \"before\" ? (\n                <svg viewBox=\"0 0 10 10\">\n                  <path d=\"M2.5 2.5l5 5M7.5 2.5l-5 5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" />\n                </svg>\n              ) : (\n                <svg viewBox=\"0 0 10 10\">\n                  <path d=\"M2 5.3l2 2 4-4.6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.7\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                </svg>\n              )}\n            </span>\n            {p}\n          </li>\n        ))}\n      </ul>\n    </div>\n  );\n}\n\nexport function ComparisonVersus({\n  eyebrow = \"Before and after\",\n  title = \"Same launch. One-tenth of the busywork.\",\n  subtitle = \"What changed for the content team at Northwind after moving 1,200 pages to Inkwell in a single sprint.\",\n  before = defaultBefore,\n  after = defaultAfter,\n  metrics = defaultMetrics,\n  badge = \"VS\",\n  accent = \"#22d3ee\",\n  className = \"\",\n  style,\n  ...rest\n}: ComparisonVersusProps) {\n  const vars = { \"--hb-kc6-accent\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <section className={`hb-kc6 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-comparison-versus\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kc6-inner\">\n        <div className=\"hb-kc6-head\">\n          {eyebrow ? <p className=\"hb-kc6-eyebrow\">{eyebrow}</p> : null}\n          <h2 className=\"hb-kc6-title\">{title}</h2>\n          {subtitle ? <p className=\"hb-kc6-sub\">{subtitle}</p> : null}\n        </div>\n        <div className=\"hb-kc6-split\">\n          <Side side=\"before\" data={before} />\n          <span className=\"hb-kc6-vs\" aria-hidden=\"true\">{badge}</span>\n          <Side side=\"after\" data={after} />\n        </div>\n        {metrics.length ? (\n          <ul className=\"hb-kc6-metrics\">\n            {metrics.map((m) => (\n              <li key={m.label} className=\"hb-kc6-metric\">\n                <p className=\"hb-kc6-mlabel\">{m.label}</p>\n                <p className=\"hb-kc6-mvals\">\n                  <span className=\"hb-kc6-old\">\n                    <span className=\"hb-kc6-sr\">{`${before.label}: `}</span>\n                    {m.before}\n                  </span>\n                  <svg className=\"hb-kc6-arrow\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n                    <path d=\"M2 6h7.5M6.5 3l3 3-3 3\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                  </svg>\n                  <span className=\"hb-kc6-new\">\n                    <span className=\"hb-kc6-sr\">{`, ${after.label}: `}</span>\n                    {m.after}\n                  </span>\n                </p>\n                <div className=\"hb-kc6-bars\" aria-hidden=\"true\">\n                  <span className=\"hb-kc6-bar\" data-k=\"before\" />\n                  <span\n                    className=\"hb-kc6-bar\"\n                    data-k=\"after\"\n                    style={{ \"--hb-kc6-r\": `${(Math.min(1, Math.max(0, m.ratio)) * 100).toFixed(1)}%` } as React.CSSProperties}\n                  />\n                </div>\n              </li>\n            ))}\n          </ul>\n        ) : null}\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}