{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "analytics-09",
  "type": "registry:block",
  "description": "Split layout with retention narrative and summary stats beside a color-scaled monthly cohort retention table.",
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/analytics/analytics-09.tsx",
      "content": "import { CounterNumber } from \"@/registry/designali/ui/counter-number\"\n\nconst cohorts = [\n  { month: \"May 2026\", size: 1240, retention: [100, 72, 61, 55, 51, 48, 46] },\n  { month: \"Jun 2026\", size: 1385, retention: [100, 74, 63, 57, 53, 50] },\n  { month: \"Jul 2026\", size: 1512, retention: [100, 76, 66, 60, 56] },\n  { month: \"Aug 2026\", size: 1460, retention: [100, 78, 68, 62] },\n  { month: \"Sep 2026\", size: 1698, retention: [100, 81, 71] },\n  { month: \"Oct 2026\", size: 1874, retention: [100, 83] },\n  { month: \"Nov 2026\", size: 902, retention: [100] },\n]\n\nconst periods = 7\n\nfunction cellStyle(value: number) {\n  const alpha = 0.08 + (value / 100) * 0.82\n  return {\n    background: `color-mix(in oklch, var(--chart-1) ${Math.round(alpha * 100)}%, transparent)`,\n  }\n}\n\nexport default function Analytics09() {\n  return (\n    <section className=\"w-full bg-background py-16 text-foreground md:py-24\">\n      <div className=\"mx-auto max-w-7xl px-6\">\n        <div className=\"grid gap-10 lg:grid-cols-[1fr_2.4fr]\">\n          <div>\n            <p className=\"text-xs tracking-widest text-muted-foreground uppercase\">\n              Retention\n            </p>\n            <h2 className=\"mt-2 text-3xl font-medium tracking-tight\">\n              Designali Pro members are sticking longer\n            </h2>\n            <p className=\"mt-4 text-sm leading-6 text-muted-foreground\">\n              Since the new /docs onboarding launched in July, month-one retention\n              has climbed from 72% to 83%. Each row is the share of a Designali Pro\n              cohort still active after N months.\n            </p>\n            <dl className=\"mt-8 grid grid-cols-2 gap-px border bg-border\">\n              <div className=\"bg-background p-4\">\n                <dt className=\"text-xs text-muted-foreground\">M1 retention</dt>\n                <dd className=\"mt-1\">\n                  <CounterNumber value={83} suffix=\"%\" className=\"text-2xl font-semibold\" />\n                </dd>\n              </div>\n              <div className=\"bg-background p-4\">\n                <dt className=\"text-xs text-muted-foreground\">M3 retention</dt>\n                <dd className=\"mt-1\">\n                  <CounterNumber value={62} suffix=\"%\" className=\"text-2xl font-semibold\" />\n                </dd>\n              </div>\n            </dl>\n          </div>\n\n          <div className=\"min-w-0 overflow-x-auto border\">\n            <table className=\"w-full min-w-[560px] border-collapse text-xs\">\n              <thead>\n                <tr className=\"border-b bg-muted/50 text-muted-foreground\">\n                  <th className=\"px-3 py-3 text-left font-medium\">Cohort</th>\n                  <th className=\"px-3 py-3 text-right font-medium\">Members</th>\n                  {Array.from({ length: periods }, (_, i) => (\n                    <th key={i} className=\"px-1 py-3 text-center font-medium\">\n                      M{i}\n                    </th>\n                  ))}\n                </tr>\n              </thead>\n              <tbody>\n                {cohorts.map((c) => (\n                  <tr key={c.month} className=\"border-b last:border-b-0\">\n                    <td className=\"px-3 py-2 font-medium whitespace-nowrap\">{c.month}</td>\n                    <td className=\"px-3 py-2 text-right font-sans text-muted-foreground\">\n                      {c.size.toLocaleString()}\n                    </td>\n                    {Array.from({ length: periods }, (_, i) => {\n                      const v = c.retention[i]\n                      return (\n                        <td key={i} className=\"p-0.5\">\n                          {v !== undefined ? (\n                            <div\n                              style={cellStyle(v)}\n                              className=\"flex h-9 items-center justify-center font-sans text-foreground\"\n                            >\n                              {v}%\n                            </div>\n                          ) : (\n                            <div className=\"h-9 bg-muted/30\" />\n                          )}\n                        </td>\n                      )\n                    })}\n                  </tr>\n                ))}\n              </tbody>\n            </table>\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "650px"
  },
  "categories": [
    "analytics"
  ]
}