{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "comparison-tiers",
  "type": "registry:component",
  "title": "Comparison Tiers",
  "description": "Plan cards side by side that list the same feature rows, so checks, dashes and values line up across tiers. The recommended plan gets a rotating beam border and a badge, and hovering a row highlights it in every card.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "comparison",
    "pricing",
    "plans",
    "feature comparison",
    "checks",
    "highlighted plan",
    "cards"
  ],
  "docs": "https://hyperblur.dev/effects/comparison-tiers",
  "files": [
    {
      "path": "registry/hyperblur/comparison-tiers.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/comparison-tiers.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type ComparisonTiersValue = boolean | string;\n\nexport interface ComparisonTiersTier {\n  name: string;\n  price: string;\n  period?: string;\n  blurb: string;\n  values: ComparisonTiersValue[];\n  cta: { label: string; href: string };\n  badge?: string;\n}\n\nexport interface ComparisonTiersProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  rows?: string[];\n  tiers?: ComparisonTiersTier[];\n  highlight?: number;\n  onTierSelect?: (index: number, tier: ComparisonTiersTier) => void;\n  accent?: string;\n}\n\nconst css = `\n.hb-yh1 {\n  --hb-yh1-accent: #8b5cf6;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  overflow: hidden;\n  padding: clamp(64px, 9cqi, 112px) 20px;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yh1 *, .hb-yh1 *::before, .hb-yh1 *::after { box-sizing: border-box; }\n.hb-yh1::before {\n  content: \"\";\n  position: absolute;\n  inset: -20% -10% auto;\n  height: 70%;\n  background: radial-gradient(50% 60% at 50% 0%, color-mix(in srgb, var(--hb-yh1-accent) 22%, transparent), transparent 70%);\n  pointer-events: none;\n}\n.hb-yh1-in { position: relative; max-width: 1120px; margin: 0 auto; }\n.hb-yh1-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }\n.hb-yh1-eyebrow {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  height: 28px;\n  padding: 0 12px;\n  border: 1px solid rgba(255,255,255,.1);\n  border-radius: 999px;\n  background: rgba(255,255,255,.03);\n  color: #a1a1a1;\n  font-size: 12.5px;\n  font-weight: 500;\n}\n.hb-yh1-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--hb-yh1-accent); box-shadow: 0 0 10px var(--hb-yh1-accent); }\n.hb-yh1-title { margin: 18px 0 0; font-size: clamp(30px, 4.6cqi, 48px); font-weight: 650; letter-spacing: -.035em; line-height: 1.06; }\n.hb-yh1-sub { margin: 14px auto 0; max-width: 520px; color: #8f8f8f; font-size: 16px; line-height: 1.6; }\n.hb-yh1-grid { display: grid; grid-template-columns: repeat(var(--hb-yh1-n, 3), minmax(0, 1fr)); gap: 16px; align-items: stretch; }\n.hb-yh1-card {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  min-width: 0;\n  padding: 26px 24px 24px;\n  border: 1px solid rgba(255,255,255,.08);\n  border-radius: 20px;\n  background: linear-gradient(180deg, #131313, #0e0e0e);\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);\n  opacity: 0;\n  transform: translateY(18px);\n  animation: hb-yh1-rise .7s cubic-bezier(.2,.8,.2,1) forwards;\n  animation-delay: calc(var(--hb-yh1-i) * 110ms);\n}\n.hb-yh1-card[data-pick=\"true\"] {\n  border-color: transparent;\n  background: linear-gradient(180deg, #17151f, #0f0e14) padding-box, conic-gradient(from var(--hb-yh1-a, 0deg), transparent 0deg, var(--hb-yh1-accent) 60deg, transparent 140deg, transparent 220deg, color-mix(in srgb, var(--hb-yh1-accent) 60%, #fff) 290deg, transparent 360deg) border-box;\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 30px 80px -30px color-mix(in srgb, var(--hb-yh1-accent) 55%, transparent);\n  animation: hb-yh1-rise .7s cubic-bezier(.2,.8,.2,1) forwards, hb-yh1-spin 6s linear infinite;\n  animation-delay: calc(var(--hb-yh1-i) * 110ms), 0s;\n}\n@property --hb-yh1-a { syntax: \"<angle>\"; inherits: false; initial-value: 0deg; }\n.hb-yh1-badge {\n  position: absolute;\n  top: -11px;\n  left: 24px;\n  height: 22px;\n  padding: 0 10px;\n  border-radius: 999px;\n  background: var(--hb-yh1-accent);\n  color: #fff;\n  font-size: 11.5px;\n  font-weight: 650;\n  line-height: 22px;\n  letter-spacing: .01em;\n  box-shadow: 0 6px 20px -4px color-mix(in srgb, var(--hb-yh1-accent) 70%, transparent);\n}\n.hb-yh1-name { margin: 0; color: #d4d4d4; font-size: 15px; font-weight: 600; }\n.hb-yh1-price { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; }\n.hb-yh1-amt { font-size: 40px; font-weight: 650; letter-spacing: -.04em; line-height: 1; }\n.hb-yh1-per { color: #8f8f8f; font-size: 13.5px; }\n.hb-yh1-blurb { margin: 12px 0 0; min-height: 42px; color: #8f8f8f; font-size: 13.5px; line-height: 1.55; }\n.hb-yh1-cta {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  height: 42px;\n  margin-top: 20px;\n  border: 1px solid rgba(255,255,255,.12);\n  border-radius: 999px;\n  background: rgba(255,255,255,.04);\n  color: #ededed;\n  font-size: 14px;\n  font-weight: 600;\n  text-decoration: none;\n  transition: background-color .2s ease, border-color .2s ease, transform .15s ease;\n}\n.hb-yh1-cta:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); }\n.hb-yh1-cta:active { transform: scale(.98); }\n.hb-yh1-card[data-pick=\"true\"] .hb-yh1-cta { border-color: transparent; background: #ededed; color: #0a0a0a; }\n.hb-yh1-card[data-pick=\"true\"] .hb-yh1-cta:hover { background: #fff; }\n.hb-yh1-list { margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,.07); list-style: none; }\n.hb-yh1-row {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  min-height: 34px;\n  margin: 0 -10px;\n  padding: 0 10px;\n  border-radius: 9px;\n  color: #c9c9c9;\n  font-size: 13.5px;\n  transition: background-color .2s ease, color .2s ease;\n}\n.hb-yh1-row[data-off=\"true\"] { color: #5f5f5f; }\n.hb-yh1-row[data-hot=\"true\"] { background: rgba(255,255,255,.05); color: #fff; }\n.hb-yh1-row[data-off=\"true\"][data-hot=\"true\"] { color: #8f8f8f; }\n.hb-yh1-ic { display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.06); }\n.hb-yh1-ic svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }\n.hb-yh1-ic[data-on=\"true\"] { background: color-mix(in srgb, var(--hb-yh1-accent) 18%, transparent); color: color-mix(in srgb, var(--hb-yh1-accent) 70%, #fff); }\n.hb-yh1-ic[data-on=\"true\"] path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: hb-yh1-draw .5s ease forwards; animation-delay: calc(400ms + var(--hb-yh1-i) * 110ms + var(--hb-yh1-r) * 60ms); }\n.hb-yh1-lbl { flex: 1; min-width: 0; }\n.hb-yh1-val { flex: none; color: #ededed; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-yh1-card[data-pick=\"true\"] .hb-yh1-val { color: color-mix(in srgb, var(--hb-yh1-accent) 60%, #fff); }\n.hb-yh1-foot { margin-top: 28px; color: #6f6f6f; font-size: 13px; text-align: center; }\n.hb-yh1-foot a { color: #a1a1a1; text-underline-offset: 3px; }\n.hb-yh1 a:focus-visible { outline: 2px solid var(--hb-yh1-accent); outline-offset: 3px; }\n@keyframes hb-yh1-rise { to { opacity: 1; transform: none; } }\n@keyframes hb-yh1-spin { to { --hb-yh1-a: 360deg; } }\n@keyframes hb-yh1-draw { to { stroke-dashoffset: 0; } }\n@container (max-width: 760px) {\n  .hb-yh1-grid { grid-template-columns: minmax(0, 1fr); max-width: 440px; margin: 0 auto; gap: 22px; }\n  .hb-yh1-blurb { min-height: 0; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yh1 *, .hb-yh1 *::before, .hb-yh1 *::after { animation: none !important; transition: none !important; }\n  .hb-yh1-card { opacity: 1; transform: none; }\n  .hb-yh1-ic[data-on=\"true\"] path { stroke-dashoffset: 0; }\n}\n`;\n\nconst defaultRows = [\n  \"Projects\",\n  \"Editors per project\",\n  \"Version history\",\n  \"Custom domains\",\n  \"Branch previews\",\n  \"Audit log\",\n  \"SSO and SCIM\",\n];\n\nconst defaultTiers: ComparisonTiersTier[] = [\n  {\n    name: \"Starter\",\n    price: \"$0\",\n    period: \"forever\",\n    blurb: \"For side projects and trying things out with one collaborator.\",\n    values: [\"3\", \"2\", \"7 days\", false, false, false, false],\n    cta: { label: \"Start for free\", href: \"#\" },\n  },\n  {\n    name: \"Studio\",\n    price: \"$24\",\n    period: \"per editor / mo\",\n    blurb: \"For product teams shipping every week across several sites.\",\n    values: [\"Unlimited\", \"10\", \"1 year\", true, true, false, false],\n    cta: { label: \"Try Studio for 14 days\", href: \"#\" },\n    badge: \"Most teams pick this\",\n  },\n  {\n    name: \"Scale\",\n    price: \"$59\",\n    period: \"per editor / mo\",\n    blurb: \"For companies that need controls, compliance and a named contact.\",\n    values: [\"Unlimited\", \"Unlimited\", \"Forever\", true, true, true, true],\n    cta: { label: \"Talk to sales\", href: \"#\" },\n  },\n];\n\nfunction Check() {\n  return (\n    <svg viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n      <path d=\"M2.5 6.3 5 8.6l4.5-5\" />\n    </svg>\n  );\n}\n\nfunction Dash() {\n  return (\n    <svg viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n      <path d=\"M3.5 6h5\" />\n    </svg>\n  );\n}\n\nexport function ComparisonTiers({\n  eyebrow = \"Compare plans\",\n  title = \"Pick the plan that fits how you ship\",\n  subtitle = \"Every plan includes unlimited viewers, global CDN hosting and SSL. Upgrade or downgrade any time.\",\n  rows = defaultRows,\n  tiers = defaultTiers,\n  highlight = 1,\n  onTierSelect,\n  accent = \"#8b5cf6\",\n  className = \"\",\n  style,\n  ...rest\n}: ComparisonTiersProps) {\n  const [hot, setHot] = React.useState<number | null>(null);\n\n  return (\n    <section\n      className={`hb-yh1 ${className}`}\n      style={{ \"--hb-yh1-accent\": accent, \"--hb-yh1-n\": tiers.length, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-comparison-tiers\" precedence=\"default\">\n        {css}\n      </style>\n      <div className=\"hb-yh1-in\">\n        <header className=\"hb-yh1-head\">\n          {eyebrow && (\n            <span className=\"hb-yh1-eyebrow\">\n              <i aria-hidden=\"true\" />\n              {eyebrow}\n            </span>\n          )}\n          <h2 className=\"hb-yh1-title\">{title}</h2>\n          {subtitle && <p className=\"hb-yh1-sub\">{subtitle}</p>}\n        </header>\n        <div className=\"hb-yh1-grid\">\n          {tiers.map((tier, i) => {\n            const pick = i === highlight;\n            return (\n              <article\n                key={tier.name}\n                className=\"hb-yh1-card\"\n                data-pick={pick ? \"true\" : \"false\"}\n                style={{ \"--hb-yh1-i\": i } as React.CSSProperties}\n                aria-label={pick && tier.badge ? `${tier.name}, ${tier.badge}` : tier.name}\n              >\n                {pick && tier.badge && <span className=\"hb-yh1-badge\">{tier.badge}</span>}\n                <h3 className=\"hb-yh1-name\">{tier.name}</h3>\n                <div className=\"hb-yh1-price\">\n                  <span className=\"hb-yh1-amt\">{tier.price}</span>\n                  {tier.period && <span className=\"hb-yh1-per\">{tier.period}</span>}\n                </div>\n                <p className=\"hb-yh1-blurb\">{tier.blurb}</p>\n                <a href={tier.cta.href} className=\"hb-yh1-cta\" onClick={() => onTierSelect?.(i, tier)}>\n                  {tier.cta.label}\n                </a>\n                <ul className=\"hb-yh1-list\">\n                  {rows.map((row, r) => {\n                    const v = tier.values[r];\n                    const on = v !== false && v !== undefined;\n                    return (\n                      <li\n                        key={row}\n                        className=\"hb-yh1-row\"\n                        data-off={on ? \"false\" : \"true\"}\n                        data-hot={hot === r ? \"true\" : \"false\"}\n                        onPointerEnter={() => setHot(r)}\n                        onPointerLeave={() => setHot(null)}\n                        style={{ \"--hb-yh1-r\": r } as React.CSSProperties}\n                      >\n                        <span className=\"hb-yh1-ic\" data-on={on ? \"true\" : \"false\"}>\n                          {on ? <Check /> : <Dash />}\n                        </span>\n                        <span className=\"hb-yh1-lbl\">{row}</span>\n                        {typeof v === \"string\" ? (\n                          <span className=\"hb-yh1-val\">{v}</span>\n                        ) : (\n                          <span className=\"hb-yh1-sr\" style={{ position: \"absolute\", width: 1, height: 1, overflow: \"hidden\", clipPath: \"inset(50%)\" }}>\n                            {on ? \"Included\" : \"Not included\"}\n                          </span>\n                        )}\n                      </li>\n                    );\n                  })}\n                </ul>\n              </article>\n            );\n          })}\n        </div>\n        <p className=\"hb-yh1-foot\">\n          Prices in USD, billed annually. Need more than 50 editors? <a href=\"#\">Get a custom quote</a>\n        </p>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}