Navigation Menu

Site navigation with menus that morph from one to the next, on the menu material.

@cupertinoui/navigation-menuBase UI Navigation Menu Registry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/navigation-menu

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger } from "@/components/ui/navigation-menu"

<NavigationMenu>
  <NavigationMenuList>
    <NavigationMenuItem>
      <NavigationMenuTrigger>Components</NavigationMenuTrigger>
      <NavigationMenuContent>
        <NavigationMenuLink href="/docs/components/window">Window</NavigationMenuLink>
      </NavigationMenuContent>
    </NavigationMenuItem>
  </NavigationMenuList>
</NavigationMenu>

API Reference

Every part forwards the props of the underlying Base UI Navigation Menu part. The props below are the ones CupertinoUI adds or changes.

NavigationMenu

PropTypeDescription
align"start" | "center" | "end"
Default: "start"
How the menu lines up with its trigger.
classNamestringExtra classes, merged with the component's own.