{
  "schemaVersion": 1,
  "name": "navigation-menu",
  "useFor": "Use for a site's top navigation with grouped destinations (Product, Docs). Put NavigationMenuLink rows with a title and a muted line inside each NavigationMenuContent. Pass viewport={false} to open each panel under its own trigger. navigationMenuTriggerStyle styles a plain link as a trigger; call it from a client component.",
  "constraints": [
    "Actions in a navigation menu",
    "A navigation menu inside the console's rail (use Sidebar)",
    "Panels taller than the screen"
  ],
  "documentation": "",
  "source": "Extrapolated from the Inkbox console (Figma 427:2715): the rail's nav rows and the raised panel",
  "exports": [
    "NavigationMenu",
    "NavigationMenuContent",
    "NavigationMenuIndicator",
    "NavigationMenuItem",
    "NavigationMenuLink",
    "NavigationMenuList",
    "NavigationMenuTrigger",
    "NavigationMenuViewport",
    "navigationMenuTriggerStyle"
  ],
  "client": true,
  "docsUrl": "https://inkbox-ds.vercel.app/components/navigation-menu",
  "markdownUrl": "https://inkbox-ds.vercel.app/r/navigation-menu.md",
  "examples": [
    {
      "path": "examples/navigation-menu.tsx",
      "content": "\"use client\";\n\n\nimport { ChatCircleTextIcon, EnvelopeSimpleIcon, LockKeyIcon, PhoneIcon, ArrowsLeftRightIcon, WebhooksLogoIcon } from \"@phosphor-icons/react/ssr\";\n\nimport {\n  NavigationMenu,\n  NavigationMenuContent,\n  NavigationMenuItem,\n  NavigationMenuLink,\n  NavigationMenuList,\n  NavigationMenuTrigger,\n  navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\";\n\nconst CHANNELS = [\n  { title: \"Email\", body: \"A mailbox for every agent, on inkboxmail.com or your domain.\", icon: EnvelopeSimpleIcon },\n  { title: \"Phone\", body: \"Calls and texts on a number the agent owns.\", icon: PhoneIcon },\n  { title: \"iMessage\", body: \"Shared or dedicated lines that also handle calls.\", icon: ChatCircleTextIcon },\n  { title: \"Agent2Agent\", body: \"Publish an Agent Card and take tasks from other agents.\", icon: ArrowsLeftRightIcon },\n];\n\nfunction Menu({ defaultValue }: { defaultValue?: string }) {\n  return (\n    <NavigationMenu defaultValue={defaultValue}>\n      <NavigationMenuList>\n        <NavigationMenuItem value=\"channels\">\n          <NavigationMenuTrigger>Channels</NavigationMenuTrigger>\n          <NavigationMenuContent>\n            <ul className=\"grid w-[min(34rem,calc(100vw-2rem))] gap-1 sm:grid-cols-2\">\n              {CHANNELS.map(({ title, body, icon: Icon }) => (\n                <li key={title}>\n                  <NavigationMenuLink href={`#${title.toLowerCase()}`}>\n                    <span className=\"flex items-center gap-2.5 font-medium\">\n                      <Icon weight=\"fill\" />\n                      {title}\n                    </span>\n                    <span className=\"text-fg-muted\">{body}</span>\n                  </NavigationMenuLink>\n                </li>\n              ))}\n            </ul>\n          </NavigationMenuContent>\n        </NavigationMenuItem>\n        <NavigationMenuItem value=\"shared\">\n          <NavigationMenuTrigger>Shared</NavigationMenuTrigger>\n          <NavigationMenuContent>\n            <ul className=\"grid w-[min(16rem,calc(100vw-2rem))] gap-1\">\n              <li>\n                <NavigationMenuLink href=\"#vault\">\n                  <span className=\"flex items-center gap-2.5 font-medium\">\n                    <LockKeyIcon weight=\"fill\" />\n                    Vault\n                  </span>\n                  <span className=\"text-fg-muted\">Zero-knowledge secrets for your agents.</span>\n                </NavigationMenuLink>\n              </li>\n              <li>\n                <NavigationMenuLink href=\"#webhooks\">\n                  <span className=\"flex items-center gap-2.5 font-medium\">\n                    <WebhooksLogoIcon weight=\"fill\" />\n                    Webhooks\n                  </span>\n                  <span className=\"text-fg-muted\">Event payloads, signed and delivered.</span>\n                </NavigationMenuLink>\n              </li>\n            </ul>\n          </NavigationMenuContent>\n        </NavigationMenuItem>\n        <NavigationMenuItem>\n          <NavigationMenuLink href=\"#docs\" className={navigationMenuTriggerStyle()}>\n            Docs\n          </NavigationMenuLink>\n        </NavigationMenuItem>\n      </NavigationMenuList>\n    </NavigationMenu>\n  );\n}\n\nexport function Preview() {\n  return (\n    <div className=\"flex justify-center\">\n      <Menu />\n    </div>\n  );\n}\n\nexport function Open() {\n  return (\n    <div className=\"flex min-h-80 items-start justify-center\">\n      <Menu defaultValue=\"channels\" />\n    </div>\n  );\n}\n",
      "exports": [
        "Preview",
        "Open"
      ],
      "requires": [
        "navigation-menu"
      ],
      "packages": [
        "@phosphor-icons/react"
      ],
      "previews": [
        {
          "name": "Preview",
          "url": "https://inkbox-ds.vercel.app/preview/navigation-menu/Preview"
        },
        {
          "name": "Open",
          "url": "https://inkbox-ds.vercel.app/preview/navigation-menu/Open"
        }
      ]
    }
  ],
  "type": "ui",
  "title": "Navigation Menu",
  "description": "Nav-row triggers and links with panels that open in a raised white viewport.",
  "surface": "site",
  "kinds": [],
  "requires": [
    "theme",
    "utils"
  ],
  "packages": [
    "radix-ui",
    "@phosphor-icons/react",
    "class-variance-authority"
  ],
  "files": [
    {
      "path": "components/ui/navigation-menu.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { NavigationMenu as NavigationMenuPrimitive } from \"radix-ui\";\nimport { CaretDownIcon } from \"@phosphor-icons/react/ssr\";\nimport { cva } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\n// Site navigation with panels, extrapolated from the console's nav rows (Figma 427:2715: Agent Workspace, Manage\n// Agents): triggers and links are 38px rows with 8px corners, 12px of side padding and a 14px regular ink label, the\n// lilac under the pointer and under an open trigger; the trigger's 16px caret turns over when open (on-screen motion,\n// 200ms in-out). The panel opens below in a raised white viewport (8px corners, the floating shadow) that grows from\n// 96 percent with a fade and resizes to each panel (centered under the menu on phones, at its start from 768px); links inside are nav rows with a 14px title and a 14px muted line.\nfunction NavigationMenu({ className, children, viewport = true, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & { viewport?: boolean }) {\n  return (\n    <NavigationMenuPrimitive.Root data-slot=\"navigation-menu\" data-viewport={viewport} className={cn(\"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center\", className)} {...props}>\n      {children}\n      {viewport && <NavigationMenuViewport />}\n    </NavigationMenuPrimitive.Root>\n  );\n}\n\nfunction NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {\n  return <NavigationMenuPrimitive.List data-slot=\"navigation-menu-list\" className={cn(\"group flex flex-1 list-none items-center justify-center gap-1\", className)} {...props} />;\n}\n\nfunction NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {\n  return <NavigationMenuPrimitive.Item data-slot=\"navigation-menu-item\" className={cn(\"relative\", className)} {...props} />;\n}\n\nconst navigationMenuTriggerStyle = cva(\n  \"group inline-flex h-9.5 w-max items-center justify-center gap-1.5 rounded-control px-3 font-sans text-body leading-tight text-fg outline-none transition-colors duration-150 ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus-ring disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-subtle data-[state=open]:bg-subtle motion-reduce:transition-none [&_svg:not([class*='size-'])]:size-5.5\",\n);\n\nfunction NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {\n  return (\n    <NavigationMenuPrimitive.Trigger data-slot=\"navigation-menu-trigger\" className={cn(navigationMenuTriggerStyle(), className)} {...props}>\n      {children}\n      <CaretDownIcon aria-hidden className=\"size-4.5 text-fg-muted transition-transform duration-200 ease-in-out group-data-[state=open]:rotate-180 motion-reduce:transition-none\" />\n    </NavigationMenuPrimitive.Trigger>\n  );\n}\n\nfunction NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {\n  return (\n    <NavigationMenuPrimitive.Content\n      data-slot=\"navigation-menu-content\"\n      className={cn(\n        \"top-0 left-0 w-full p-1.5 md:absolute md:w-auto\",\n        \"group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-control group-data-[viewport=false]/navigation-menu:bg-surface group-data-[viewport=false]/navigation-menu:shadow-floating group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-pop-out group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-pop-in\",\n        \"data-[motion^=from-]:animate-fade-in data-[motion^=to-]:animate-fade-out\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {\n  return (\n    <div className=\"absolute top-full left-1/2 isolate z-50 flex -translate-x-1/2 justify-center md:left-0 md:translate-x-0\">\n      <NavigationMenuPrimitive.Viewport\n        data-slot=\"navigation-menu-viewport\"\n        className={cn(\n          \"relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-(--radix-navigation-menu-viewport-width) max-w-[calc(100vw-2rem)] origin-top md:origin-top-left overflow-hidden rounded-control bg-surface text-fg shadow-floating transition-[width,height] duration-200 ease-out data-[state=closed]:animate-pop-out data-[state=open]:animate-pop-in motion-reduce:transition-none\",\n          className,\n        )}\n        {...props}\n      />\n    </div>\n  );\n}\n\nfunction NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {\n  return (\n    <NavigationMenuPrimitive.Link\n      data-slot=\"navigation-menu-link\"\n      className={cn(\n        \"flex flex-col gap-0.5 rounded-control p-3 text-body leading-tight text-fg outline-none transition-colors duration-150 ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus-ring data-[active=true]:bg-subtle motion-reduce:transition-none [&_svg:not([class*='size-'])]:size-5.5 [&_svg:not([class*='text-'])]:text-icon-default\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction NavigationMenuIndicator({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {\n  return (\n    <NavigationMenuPrimitive.Indicator\n      data-slot=\"navigation-menu-indicator\"\n      className={cn(\"top-full z-10 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-fade-out data-[state=visible]:animate-fade-in\", className)}\n      {...props}\n    >\n      <div className=\"relative top-[60%] size-2.5 rotate-45 rounded-tl-xs bg-surface shadow-floating\" />\n    </NavigationMenuPrimitive.Indicator>\n  );\n}\n\nexport {\n  NavigationMenu,\n  NavigationMenuContent,\n  NavigationMenuIndicator,\n  NavigationMenuItem,\n  NavigationMenuLink,\n  NavigationMenuList,\n  NavigationMenuTrigger,\n  NavigationMenuViewport,\n  navigationMenuTriggerStyle,\n};\n"
    }
  ]
}
