{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "margin-note-demo",
  "type": "registry:block",
  "title": "Margin Note: Weekly Signups",
  "description": "Annotated Line Chart example, Weekly Signups: Sixteen weeks of signups for a design tool, read with notes on launch week, a login outage and the free plan going to three seats. A take on the chart (graph). Fits stats and app UI sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "stats",
    "app-ui",
    "chart",
    "annotation",
    "data",
    "ai"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/margin-note#margin-note-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/margin-note.json"
  ],
  "files": [
    {
      "path": "components/margin-note-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { MarginNote, type MarginNoteNote } from \"@/components/ui/margin-note\";\n\nconst WEEKS = [\n  \"Jul 7\", \"Jul 14\", \"Jul 21\", \"Jul 28\", \"Aug 4\", \"Aug 11\", \"Aug 18\", \"Aug 25\",\n  \"Sep 1\", \"Sep 8\", \"Sep 15\", \"Sep 22\", \"Sep 29\", \"Oct 6\", \"Oct 13\", \"Oct 20\",\n];\nconst SIGNUPS = [612, 640, 655, 1720, 1180, 905, 880, 862, 498, 870, 892, 1150, 1205, 1238, 1262, 1290];\n\nconst NOTES: MarginNoteNote[] = [\n  { at: 3, title: \"Launch week\", body: \"1,720 signups, 2.6× a normal week.\", delta: \"+163%\" },\n  { at: 8, title: \"Login outage\", body: \"Sign-in was down for six hours on Tuesday.\", delta: \"−42%\" },\n  { at: 11, to: 14, title: \"Free plan, three seats\", body: \"Signups held 38% higher for four weeks.\", delta: \"+38%\" },\n];\n\nexport function MarginNoteDemo() {\n  const [run, setRun] = React.useState(0);\n  return (\n    <div className=\"w-full max-w-3xl rounded-2xl bg-white p-5 text-zinc-900 shadow-sm ring-1 ring-zinc-950/[0.08] sm:p-7 dark:bg-zinc-900 dark:text-zinc-100 dark:ring-white/10\">\n      <div className=\"mb-5 flex items-start justify-between gap-4\">\n        <div>\n          <p className=\"text-xs font-medium text-zinc-500 dark:text-zinc-400\">Kiln · Weekly signups</p>\n          <p className=\"mt-1 flex items-baseline gap-2\">\n            <span className=\"text-2xl font-semibold tracking-tight tabular-nums\">15,859</span>\n            <span className=\"text-xs text-zinc-500 dark:text-zinc-400\">last 16 weeks</span>\n          </p>\n        </div>\n        <button\n          type=\"button\"\n          onClick={() => setRun((r) => r + 1)}\n          className=\"inline-flex h-8 items-center gap-1.5 rounded-full px-3 text-xs font-medium text-zinc-600 ring-1 ring-zinc-950/10 transition-colors hover:bg-zinc-50 hover:text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-950 dark:text-zinc-300 dark:ring-white/15 dark:hover:bg-white/5 dark:hover:text-white dark:focus-visible:outline-white\"\n        >\n          <svg viewBox=\"0 0 16 16\" className=\"size-3.5\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.6} aria-hidden>\n            <path d=\"M2.75 8a5.25 5.25 0 1 0 1.6-3.77M2.75 2.75v2.5h2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n          </svg>\n          Read again\n        </button>\n      </div>\n      <MarginNote\n        key={run}\n        label=\"Kiln weekly signups\"\n        data={SIGNUPS}\n        labels={WEEKS}\n        notes={NOTES}\n        summary=\"Signups are up 38% since the free plan went to three seats.\"\n        format={(value) => value.toLocaleString(\"en-US\")}\n      />\n    </div>\n  );\n}\n"
    }
  ]
}