{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "jot-demo",
  "type": "registry:block",
  "title": "Jot: Annotated Hero",
  "description": "Hand-Drawn Annotation Arrow example, Annotated Hero: A form builder's hero. Two notes write themselves in, one curling its arrow up to the call to action, the other pointing at the live reply count. A take on the annotation (arrow). Fits hero, pricing, onboarding and testimonials sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "hero",
    "pricing",
    "onboarding",
    "testimonials",
    "annotation",
    "tooltip",
    "svg"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/jot#jot-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/jot.json"
  ],
  "files": [
    {
      "path": "components/jot-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Jot } from \"@/components/ui/jot\";\n\n// The last twelve hours of replies, oldest first; the newest bar grows as replies come in.\nconst HOURS = [18, 26, 22, 35, 41, 38, 52, 61, 48, 57, 66, 44];\n\nexport function JotDemo() {\n  const ctaRef = React.useRef<HTMLAnchorElement>(null);\n  const statsRef = React.useRef<HTMLDivElement>(null);\n  const [replies, setReplies] = React.useState(1284);\n\n  // A reply or two every couple of seconds, so \"live\" is true.\n  React.useEffect(() => {\n    const timer = window.setInterval(() => setReplies((n) => n + 1 + Math.floor(Math.random() * 2)), 2200);\n    return () => window.clearInterval(timer);\n  }, []);\n\n  const latest = HOURS[HOURS.length - 1] + (replies - 1284) * 2;\n  const top = Math.max(...HOURS, latest);\n\n  return (\n    <div data-jot-scope className=\"@container/jot relative w-full max-w-[56rem] px-2 pt-24 pb-32 @lg/jot:px-6 @3xl/jot:pt-28 @3xl/jot:pb-40\">\n      <div className=\"mx-auto grid max-w-[38rem] gap-8 rounded-[1.75rem] border border-zinc-950/10 bg-white p-6 shadow-[0_1px_2px_rgb(0_0_0/0.04),0_12px_32px_-12px_rgb(0_0_0/0.12)] @lg/jot:grid-cols-[1fr_12rem] @lg/jot:p-8 dark:border-white/10 dark:bg-zinc-900 dark:shadow-none\">\n        <div className=\"flex flex-col\">\n          <p className=\"flex items-center gap-2 text-[13px] font-medium text-zinc-500 dark:text-zinc-400\">\n            <svg viewBox=\"0 0 20 20\" aria-hidden className=\"size-5\">\n              <rect width=\"20\" height=\"20\" rx=\"6\" className=\"fill-zinc-950 dark:fill-white\" />\n              <path\n                d=\"M5.5 7.5 7.6 13l2.4-5 2.4 5 2.1-5.5\"\n                className=\"fill-none stroke-white dark:stroke-zinc-950\"\n                strokeWidth=\"1.6\"\n                strokeLinecap=\"round\"\n                strokeLinejoin=\"round\"\n              />\n            </svg>\n            Wren Forms\n          </p>\n          <h2 className=\"mt-5 text-[2rem]/[1.05] font-semibold tracking-[-0.03em] text-balance text-zinc-950 dark:text-white\">\n            Forms people actually finish.\n          </h2>\n          <p className=\"mt-3 max-w-[30ch] text-[15px]/6 text-pretty text-zinc-600 dark:text-zinc-400\">\n            One question at a time, saved as they type, easy to answer on a phone.\n          </p>\n          <div className=\"mt-7 flex flex-wrap items-center gap-x-5 gap-y-3\">\n            <a\n              ref={ctaRef}\n              href=\"#build\"\n              className=\"inline-flex h-10 items-center gap-1.5 rounded-full bg-zinc-950 px-5 text-sm font-medium text-white outline-none hover:bg-zinc-800 focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 dark:bg-white dark:text-zinc-950 dark:hover:bg-zinc-200 dark:focus-visible:ring-white dark:focus-visible:ring-offset-zinc-900\"\n            >\n              Build a form\n              <svg viewBox=\"0 0 16 16\" aria-hidden className=\"size-4\">\n                <path d=\"M6 4l4 4-4 4\" className=\"fill-none stroke-current\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n              </svg>\n            </a>\n            <a\n              href=\"#templates\"\n              className=\"rounded-sm text-sm font-medium text-zinc-600 underline decoration-zinc-300 underline-offset-4 outline-none hover:text-zinc-950 hover:decoration-zinc-950 focus-visible:ring-2 focus-visible:ring-zinc-950 dark:text-zinc-400 dark:decoration-zinc-700 dark:hover:text-white dark:hover:decoration-white dark:focus-visible:ring-white\"\n            >\n              See templates\n            </a>\n          </div>\n        </div>\n\n        <div\n          ref={statsRef}\n          className=\"order-first self-end rounded-2xl @lg/jot:order-none border border-zinc-950/[0.07] bg-zinc-50 p-4 dark:border-white/[0.07] dark:bg-zinc-950/60\"\n        >\n          <div className=\"flex items-center justify-between text-xs text-zinc-500 dark:text-zinc-400\">\n            <span>Replies today</span>\n            <span className=\"flex items-center gap-1.5\">\n              <span className=\"size-1.5 rounded-full bg-emerald-500\" />\n              Live\n            </span>\n          </div>\n          <p className=\"mt-1.5 text-[1.75rem]/none font-semibold tracking-tight text-zinc-950 tabular-nums dark:text-white\">\n            {replies.toLocaleString(\"en-US\")}\n          </p>\n          <div className=\"mt-4 flex h-12 items-end gap-[3px]\" aria-hidden>\n            {[...HOURS.slice(0, -1), latest].map((h, i) => (\n              <span\n                key={i}\n                className={\n                  i === HOURS.length - 1\n                    ? \"flex-1 rounded-[2px] bg-zinc-950 transition-[height] duration-500 ease-out dark:bg-white\"\n                    : \"flex-1 rounded-[2px] bg-zinc-300 dark:bg-zinc-700\"\n                }\n                style={{ height: `${(h / top) * 100}%` }}\n              />\n            ))}\n          </div>\n          <p className=\"mt-3 flex justify-between text-xs text-zinc-500 tabular-nums dark:text-zinc-400\">\n            <span>Finish rate</span>\n            <span className=\"font-medium text-zinc-950 dark:text-white\">71%</span>\n          </p>\n        </div>\n      </div>\n\n      <Jot\n        to={ctaRef}\n        loop\n        bend={-0.35}\n        tilt={-3}\n        className=\"absolute bottom-5 left-4 max-w-44 text-xl/snug text-blue-600 @lg/jot:left-6 @3xl/jot:bottom-7 @3xl/jot:left-4 dark:text-blue-400\"\n      >\n        free for your first 1,000 replies\n      </Jot>\n      <Jot\n        to={statsRef}\n        bend={0.3}\n        tilt={2}\n        delay={0.7}\n        className=\"absolute top-4 right-4 max-w-none text-xl/snug text-blue-600 @lg/jot:right-6 @3xl/jot:top-6 @3xl/jot:right-4 dark:text-blue-400\"\n      >\n        real replies,\n        <br />\n        counted as they land\n      </Jot>\n    </div>\n  );\n}\n"
    }
  ]
}