{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "navigation-16",
  "type": "registry:block",
  "description": "Report reader with a sticky section index that tracks scroll position and smooth-scrolls to sections.",
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/navigation/navigation-16.tsx",
      "content": "\"use client\"\n\nimport { useRef, useState } from \"react\"\n\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst sections = [\n  {\n    id: \"summary\",\n    title: \"Summary\",\n    body: \"designali.com serves 460+ blocks, 240+ landing pages and 4000+ icons to designers and developers worldwide. This report covers reliability, speed and cost for Q3.\",\n  },\n  {\n    id: \"reliability\",\n    title: \"Reliability\",\n    body: \"Uptime held at 99.98% across the quarter. Two incidents in August accounted for most failed downloads, both traced to a misconfigured cache rule.\",\n  },\n  {\n    id: \"latency\",\n    title: \"Latency\",\n    body: \"Median page load dropped from 410ms to 260ms after moving block previews onto the edge. The 99th percentile is now under 1.2 seconds.\",\n  },\n  {\n    id: \"cost\",\n    title: \"Cost\",\n    body: \"Hosting spend fell 18% quarter over quarter. Storage grew 9% as we added new templates, UI designs and Figma source files.\",\n  },\n  {\n    id: \"next\",\n    title: \"Next quarter\",\n    body: \"Priorities are a public status page, faster icon search, and a new mobile UI kit for the Designali library.\",\n  },\n]\n\nexport default function Navigation16() {\n  const [active, setActive] = useState(sections[0]!.id)\n  const container = useRef<HTMLDivElement>(null)\n\n  function onScroll() {\n    const element = container.current\n    if (!element) return\n    const top = element.scrollTop + 40\n    let current = sections[0]!.id\n    for (const section of sections) {\n      const target = element.querySelector<HTMLElement>(`[data-section=\"${section.id}\"]`)\n      if (target && target.offsetTop <= top) current = section.id\n    }\n    setActive(current)\n  }\n\n  function jump(id: string) {\n    const target = container.current?.querySelector<HTMLElement>(`[data-section=\"${id}\"]`)\n    if (target && container.current) {\n      container.current.scrollTo({ top: target.offsetTop - 8, behavior: \"smooth\" })\n    }\n  }\n\n  const index = sections.findIndex((section) => section.id === active)\n\n  return (\n    <section className=\"w-full bg-background py-16\">\n      <div className=\"mx-auto grid max-w-5xl gap-8 px-6 md:grid-cols-[200px_1fr]\">\n        <nav aria-label=\"Report sections\" className=\"md:sticky md:top-6 md:h-fit\">\n          <p className=\"text-xs tracking-widest text-muted-foreground uppercase\">Designali Q3 report</p>\n          <div className=\"mt-3 h-0.5 bg-muted\">\n            <div\n              className=\"h-full bg-foreground transition-all duration-300\"\n              style={{ width: `${((index + 1) / sections.length) * 100}%` }}\n            />\n          </div>\n          <ol className=\"mt-4 flex gap-1 overflow-x-auto md:flex-col md:gap-0\">\n            {sections.map((section, position) => (\n              <li key={section.id} className=\"shrink-0\">\n                <button\n                  type=\"button\"\n                  onClick={() => jump(section.id)}\n                  className={cn(\n                    \"flex w-full items-center gap-3 py-2 pe-3 text-start text-sm transition-colors md:pe-0\",\n                    active === section.id ? \"text-foreground\" : \"text-muted-foreground hover:text-foreground\"\n                  )}\n                >\n                  <span className=\"font-sans text-xs tabular-nums\">0{position + 1}</span>\n                  {section.title}\n                  {active === section.id && (\n                    <span className=\"ms-auto hidden size-1.5 bg-foreground md:block\" />\n                  )}\n                </button>\n              </li>\n            ))}\n          </ol>\n        </nav>\n\n        <div\n          ref={container}\n          onScroll={onScroll}\n          className=\"relative h-[460px] overflow-y-auto border p-6 md:p-10\"\n        >\n          {sections.map((section) => (\n            <article key={section.id} data-section={section.id} className=\"pb-16 last:pb-64\">\n              <h3 className=\"text-2xl font-semibold tracking-tight\">{section.title}</h3>\n              <p className=\"mt-3 max-w-prose leading-relaxed text-muted-foreground\">{section.body}</p>\n              <div className=\"mt-6 grid grid-cols-3 gap-2\">\n                {[0, 1, 2].map((bar) => (\n                  <div key={bar} className=\"h-16 bg-muted\" />\n                ))}\n              </div>\n            </article>\n          ))}\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "650px"
  },
  "categories": [
    "navigation"
  ]
}