{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "navigation-menu",
  "type": "registry:ui",
  "title": "Navigation Menu",
  "description": "A row of site links where some open a panel of further links beneath them.",
  "categories": [
    "ui"
  ],
  "dependencies": [
    "lucide-react",
    "radix-ui"
  ],
  "registryDependencies": [
    "@rivier-ui/theme",
    "@rivier-ui/cn"
  ],
  "files": [
    {
      "path": "registry/ui/navigation-menu.tsx",
      "type": "registry:ui",
      "target": "components/ui/navigation-menu.tsx",
      "content": "\"use client\";\n/**\n * @name navigation-menu\n * @category ui\n * @description A row of site links where some open a panel of further links beneath them.\n * @when The main navigation of a site whose sections each have pages worth showing: products, documentation, a catalogue. A plain link is a NavigationMenuLink in an item; a section is a NavigationMenuTrigger with a NavigationMenuContent. Mark the current page with `active`. For a header with a brand, links and a phone menu use navbar; for commands rather than places use menubar or dropdown-menu.\n * @example\n * <NavigationMenu aria-label=\"Main\">\n *   <NavigationMenuList>\n *     <NavigationMenuItem>\n *       <NavigationMenuTrigger>Guides</NavigationMenuTrigger>\n *       <NavigationMenuContent>\n *         <NavigationMenuLink href=\"/guides/start\">Getting started</NavigationMenuLink>\n *         <NavigationMenuLink href=\"/guides/theming\">Theming</NavigationMenuLink>\n *       </NavigationMenuContent>\n *     </NavigationMenuItem>\n *     <NavigationMenuItem>\n *       <NavigationMenuLink href=\"/pricing\" active>Pricing</NavigationMenuLink>\n *     </NavigationMenuItem>\n *   </NavigationMenuList>\n * </NavigationMenu>\n */\nimport { NavigationMenu as NavigationMenuPrimitive } from \"radix-ui\";\nimport { ChevronDown } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\nconst link =\n  \"inline-flex min-h-(--control-h) items-center gap-2 rounded-control px-3 text-sm font-medium text-foreground transition-[background-color] duration-instant ease-out select-none hover:bg-accent data-active:bg-highlight-soft motion-reduce:transition-none\";\n\n/** The `nav` landmark. The panel of the open section is drawn under the row, at its start, never wider than the screen. */\nexport function NavigationMenu({ className, children, ...props }: ComponentProps<typeof NavigationMenuPrimitive.Root>) {\n  return (\n    <NavigationMenuPrimitive.Root data-slot=\"navigation-menu\" className={cn(\"relative z-10 flex w-fit max-w-full\", className)} {...props}>\n      {children}\n      <div className=\"absolute start-0 top-full pt-1.5\">\n        <NavigationMenuPrimitive.Viewport\n          data-slot=\"navigation-menu-viewport\"\n          className=\"h-(--radix-navigation-menu-viewport-height) w-(--radix-navigation-menu-viewport-width) origin-top overflow-hidden rounded-surface border bg-popover text-popover-foreground ease-out animation-duration-(--duration-base) fade-in-0 fade-out-0 zoom-in-95 zoom-out-95 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none!\"\n        />\n      </div>\n    </NavigationMenuPrimitive.Root>\n  );\n}\n\nexport function NavigationMenuList({ className, ...props }: ComponentProps<typeof NavigationMenuPrimitive.List>) {\n  return <NavigationMenuPrimitive.List data-slot=\"navigation-menu-list\" className={cn(\"flex flex-wrap items-center gap-1\", className)} {...props} />;\n}\n\nexport function NavigationMenuItem(props: ComponentProps<typeof NavigationMenuPrimitive.Item>) {\n  return <NavigationMenuPrimitive.Item data-slot=\"navigation-menu-item\" {...props} />;\n}\n\n/** The button of a section. It opens on hover and on click; the chevron turns with a transform. */\nexport function NavigationMenuTrigger({ className, children, ...props }: ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {\n  return (\n    <NavigationMenuPrimitive.Trigger data-slot=\"navigation-menu-trigger\" className={cn(link, \"group/navigation-menu-trigger data-[state=open]:bg-accent\", className)} {...props}>\n      {children}\n      <ChevronDown\n        aria-hidden=\"true\"\n        strokeWidth={1.5}\n        className=\"size-4 shrink-0 text-muted-foreground transition-transform duration-base ease-out group-data-[state=open]/navigation-menu-trigger:rotate-180 motion-reduce:transition-none\"\n      />\n    </NavigationMenuPrimitive.Trigger>\n  );\n}\n\n/** What a section opens: links, in a column by default. Arrange it with `className` (a grid for a wide panel). */\nexport function NavigationMenuContent({ className, ...props }: ComponentProps<typeof NavigationMenuPrimitive.Content>) {\n  return (\n    <NavigationMenuPrimitive.Content\n      data-slot=\"navigation-menu-content\"\n      className={cn(\"flex w-max max-w-[calc(100vw-2rem)] min-w-48 flex-col gap-1 p-2\", className)}\n      {...props}\n    />\n  );\n}\n\n/** A link, in the row or in a panel. `active` marks the page being shown and sets `aria-current=\"page\"`. Use asChild for a framework's link component. */\nexport function NavigationMenuLink({ className, ...props }: ComponentProps<typeof NavigationMenuPrimitive.Link>) {\n  return <NavigationMenuPrimitive.Link data-slot=\"navigation-menu-link\" className={cn(link, className)} {...props} />;\n}\n"
    }
  ],
  "meta": {
    "category": "ui",
    "when": "The main navigation of a site whose sections each have pages worth showing: products, documentation, a catalogue. A plain link is a NavigationMenuLink in an item; a section is a NavigationMenuTrigger with a NavigationMenuContent. Mark the current page with `active`. For a header with a brand, links and a phone menu use navbar; for commands rather than places use menubar or dropdown-menu.",
    "example": "<NavigationMenu aria-label=\"Main\">\n  <NavigationMenuList>\n    <NavigationMenuItem>\n      <NavigationMenuTrigger>Guides</NavigationMenuTrigger>\n      <NavigationMenuContent>\n        <NavigationMenuLink href=\"/guides/start\">Getting started</NavigationMenuLink>\n        <NavigationMenuLink href=\"/guides/theming\">Theming</NavigationMenuLink>\n      </NavigationMenuContent>\n    </NavigationMenuItem>\n    <NavigationMenuItem>\n      <NavigationMenuLink href=\"/pricing\" active>Pricing</NavigationMenuLink>\n    </NavigationMenuItem>\n  </NavigationMenuList>\n</NavigationMenu>",
    "client": true
  }
}
