Skip to content
GitHub (opens in a new tab)

NavigationMenu

Horizontal site nav with kit DropdownMenu dropdowns.

stableOrganismcontracts/navigationmenu.json

Preview

NavigationMenu

Horizontal site nav. Dropdowns are kit DropdownMenu. Not SideNav. Not DocsNav.

Home and Docs are links. The rest open kit DropdownMenu with ChevronDown.

Usage

Pass a flat list of links and dropdowns. Dropdowns compose kit DropdownMenu with triggerStyle=nav. Do not invent List, Trigger, Content, or Link cousins.

Do's

  • Top-of-page site navigation with links and dropdowns
  • A horizontal bar of destinations, some of which open a menu

Don'ts

<NavigationMenu
  items={[
    { id: "home", label: "Home", href: "/components#navigationmenu", active: true },
    {
      id: "getting-started",
      label: "Getting started",
      columns: 1,
      groups: [{ items: [{ id: "intro", label: "Introduction", description: "...", href: "/components#navigationmenu" }] }],
    },
    {
      id: "components",
      label: "Components",
      columns: 2,
      groups: [{ items: [{ id: "tabs", label: "Tabs", description: "...", href: "/components#tabs" }] }],
    },
    { id: "docs", label: "Docs", href: "/components#navigationmenu" },
  ]}
/>

Horizontal site nav. Dropdowns are kit DropdownMenu. Not SideNav. Not DocsNav.

  • Top-of-page site navigation with links and dropdowns
  • A horizontal bar of destinations, some of which open a menu
  • Vertical product chrome — use SideNav
  • Playground catalog list — use DocsNav
  • Path to the current page — use Breadcrumb
  • In-page panels — use Tabs
  • Actions from a button — use DropdownMenu
  • Product top bar with logo and search — use AppHeader
import { NavigationMenu } from "agentic-ds-kit";
must
  • nav with aria-label
  • Link items are a with aria-current=page when active
  • Dropdowns are kit DropdownMenu with triggerStyle=nav
  • Only one dropdown open at a time
  • Hover: the fill is one decorative layer (aria-hidden) that glides to the link or dropdown trigger on hover and keyboard focus (clip-path only, --motion-expand-*); it lands in place on first show, after the pointer leaves and on resize or scroll, and jumps with no slide under prefers-reduced-motion. Roles, aria-current, aria-expanded and focus order are unchanged and the focus ring stays on the link. The current link and an open trigger keep their own fill
defaults
Nothing extra in the contract.
stops if
  • Do not invent NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink, NavigationMenuViewport, or NavigationMenuIndicator
  • Do not use radix or @base-ui/react navigation-menu
  • Do not use native select or details for dropdowns — use kit DropdownMenu
  • Do not use SideNav or DocsNav for horizontal site nav
  • Do not use raw hex

From contracts/navigationmenu.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

NameTypeRequiredDefaultNotes
itemsarrayYes—A dropdown item is detected by groups. A link item has href and no groups.
onSelectfunctionNo—(id: string) => void
  • Component
    →

    SideNav

    Product side nav: brand header, icon items, optional badges, closeable; variant single (one column that closes to an icon rail) or rail-subnav (a fixed icon rail plus a SideNav.SubNav column with the picked parent's rows).

  • Component
    →

    DocsNav

    Docs and catalog sidebar only: title, grouped text-only links, optional decorative icons and muted counts on group and subgroup headers only, an active page pill and optional footer links.

  • Component
    →

    Breadcrumb

    Path to the current page as a hierarchy of links.

  • Component
    →

    Tabs

    Switch between related views in place.