{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "navigation-15",
  "type": "registry:block",
  "description": "Mobile menu demo in a phone frame where nested sections slide in as full panels with back buttons.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/navigation/navigation-15.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  ArrowLeft,\n  ChevronRight,\n  Menu,\n  Moon,\n  X,\n} from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nimport { IPhone } from \"@/registry/designali/ui/apple/iphone\"\n\nconst menu = [\n  {\n    label: \"Library\",\n    children: [\"Templates\", \"Blocks\", \"Landing pages\", \"UI designs\"],\n  },\n  {\n    label: \"Assets\",\n    children: [\"Icons\", \"Logos\", \"Illustrations\"],\n  },\n  { label: \"Studio\", children: [\"Brand identity\", \"UI/UX design\", \"Web development\"] },\n  { label: \"Blog\" },\n  { label: \"Contact\" },\n]\n\nexport default function Navigation15() {\n  const [open, setOpen] = useState(true)\n  const [panel, setPanel] = useState<string | null>(null)\n  const sub = menu.find((item) => item.label === panel)\n\n  return (\n    <section className=\"w-full bg-muted/40 py-16\">\n      <div className=\"mx-auto grid max-w-5xl items-center gap-12 px-6 md:grid-cols-2\">\n        <div className=\"space-y-4\">\n          <p className=\"text-xs tracking-widest text-muted-foreground uppercase\">Mobile drill-down</p>\n          <h2 className=\"text-3xl font-semibold tracking-tight\">\n            Nested menus that slide instead of stacking.\n          </h2>\n          <p className=\"text-muted-foreground\">\n            Each parent opens a full panel with a back button, so the whole\n            Designali library stays readable on a small screen.\n          </p>\n        </div>\n\n        <div className=\"flex justify-center\">\n          <IPhone variant=\"18-pro\" color=\"black\" size=\"lg\">\n          <div className=\"relative h-full overflow-hidden bg-background pt-6\">\n            <header className=\"flex h-14 items-center justify-between border-b px-4\">\n              <span className=\"font-semibold\">designali</span>\n              <button\n                type=\"button\"\n                aria-label={open ? \"Close menu\" : \"Open menu\"}\n                onClick={() => {\n                  setOpen(!open)\n                  setPanel(null)\n                }}\n                className=\"flex size-9 items-center justify-center\"\n              >\n                {open ? <X className=\"size-5\" /> : <Menu className=\"size-5\" />}\n              </button>\n            </header>\n\n            <div className=\"space-y-3 p-4\">\n              <img\n                src=\"/img/hero-1.jpg\"\n                alt=\"Designali template preview\"\n                className=\"h-28 w-full object-cover\"\n              />\n              <div className=\"h-3 w-3/4 bg-muted\" />\n              <div className=\"h-3 w-1/2 bg-muted\" />\n            </div>\n\n            <div\n              className={cn(\n                \"absolute inset-x-0 top-20 bottom-0 bg-background transition-transform duration-300\",\n                open ? \"translate-x-0\" : \"translate-x-full\"\n              )}\n            >\n              <div\n                className={cn(\n                  \"absolute inset-0 flex flex-col transition-transform duration-300\",\n                  sub && \"-translate-x-full\"\n                )}\n              >\n                <ul className=\"flex-1 divide-y\">\n                  {menu.map((item) => (\n                    <li key={item.label}>\n                      <button\n                        type=\"button\"\n                        onClick={() => item.children && setPanel(item.label)}\n                        className=\"flex w-full items-center justify-between px-5 py-4 text-start font-medium\"\n                      >\n                        {item.label}\n                        {item.children && <ChevronRight className=\"size-4 text-muted-foreground\" />}\n                      </button>\n                    </li>\n                  ))}\n                </ul>\n                <div className=\"space-y-3 border-t p-5\">\n                  <button type=\"button\" className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n                    <Moon className=\"size-4\" />\n                    Dark mode\n                  </button>\n                  <Button className=\"w-full\">Get Designali Pro</Button>\n                  <Button variant=\"outline\" className=\"w-full\">Log in</Button>\n                </div>\n              </div>\n\n              <div\n                className={cn(\n                  \"absolute inset-0 transition-transform duration-300\",\n                  sub ? \"translate-x-0\" : \"translate-x-full\"\n                )}\n              >\n                <button\n                  type=\"button\"\n                  onClick={() => setPanel(null)}\n                  className=\"flex w-full items-center gap-2 border-b px-5 py-4 text-sm text-muted-foreground\"\n                >\n                  <ArrowLeft className=\"size-4\" />\n                  Back\n                </button>\n                <p className=\"px-5 pt-5 text-xs tracking-widest text-muted-foreground uppercase\">\n                  {sub?.label}\n                </p>\n                <ul className=\"py-2\">\n                  {sub?.children?.map((child) => (\n                    <li key={child}>\n                      <a href=\"#\" className=\"block px-5 py-3 hover:bg-muted\">\n                        {child}\n                      </a>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n            </div>\n          </div>\n          </IPhone>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "750px"
  },
  "categories": [
    "navigation"
  ]
}