Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-navigation-menu.json --yes

Navigation menu

Pro

A site's header menu, for React and Tailwind CSS. Part of Goop Pro.

Open Product or Resources by pointing or by the keys and move along the row to turn the panel; follow a link to mark its page current. The pages are our own; a link marks its page here instead of leaving.

When to use

  • A site's header menu.
  • Also called: nav menu or mega menu.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Navigation menu on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-navigation-menu.json --yes
PROMPT
Add the Goop Navigation menu to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import {
  NavigationMenu,
  NavigationMenuContent,
  NavigationMenuItem,
  NavigationMenuLink,
  NavigationMenuList,
  NavigationMenuRow,
  NavigationMenuTrigger,
} from '@/components/ui/goop/navigation-menu';

function SiteMenu() {
  return (
    <NavigationMenu aria-label="Site">
      <NavigationMenuList>
        <NavigationMenuItem>
          <NavigationMenuTrigger>Product</NavigationMenuTrigger>
          <NavigationMenuContent>
            <NavigationMenuRow
              href="/notebook"
              icon="file"
              title="Interview notebook"
              description="Recordings, transcripts and notes in one place"
            />
            <NavigationMenuRow href="/search" icon="search" title="Transcript search" description="Find a quote in every study" />
          </NavigationMenuContent>
        </NavigationMenuItem>
        <NavigationMenuItem>
          <NavigationMenuLink href="/pricing" active>
            Pricing
          </NavigationMenuLink>
        </NavigationMenuItem>
      </NavigationMenuList>
    </NavigationMenu>
  );
}
  • Fits: frame: top-nav.
  • Also known as: MegaMenu, SiteNav, HeaderNav, NavMenu, Navbar.
  • It is the header's middle in a site's top bar; an app's own pages go in the Sidebar instead. Mark the page shown with active on its link or row.
  • height, width, padding, gap, corner, background, shadow, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
menuLabel?string = 'Menu'The phone's menu button's name and its sheet's title, the caller's to translate.
menuOpen?booleanThe phone's sheet open, held by the caller (close it on a route change).
defaultMenuOpen?booleanThe phone's sheet open at first.
onMenuOpenChange?(open: boolean) => voidCalled when the phone's sheet opens or closes.
container?HTMLElement | nullWhere the phone's sheet is put: the end of <body> by default.
Defaultsaria-label = 'Main'; delayDuration = 200
  • State: menuOpen (menuOpen / defaultMenuOpen / onMenuOpenChange); drawn by data-focus-visible, data-state=open
Parts
PartWhat it is
NavigationMenuListThe row of items
NavigationMenuItemOne item of the row
NavigationMenuTriggerThe trigger that opens its item's panel
NavigationMenuContentThe panel a trigger opens; columns?: 1 | 2 = 1 — One column of rows (the default) or two
NavigationMenuLinkA top-level link in the row (a page with no panel: Pricing, Docs), the triggers' look; active marks the page shown (aria-current="page", the grey wash and the text colour); takes asChild
NavigationMenuRowA row of a panel; takes asChild; title: string — The page's name, the row's words; description?: string — One line about the page, under its name; icon?: IconName — A 16 px pack icon before the words, by the pack's name; children?: ReactElement — With asChild, the caller's one link element the row is drawn on (a router's link)

Keyboard

KeyWhat it does
TabMove through the triggers and links of the row
Enter SpaceOpen or shut the focused trigger's panel
ArrowDownOpen the focused trigger's panel and move into it
ArrowLeft ArrowRightMove between the triggers and links of the row, and between a panel's rows
EscapeShut the panel and return to its trigger

Accessibility

  • The behaviour layer under the part answers keys, focus and dismissal: never write your own.
  • hover: the browser's own (:hover): write nothing

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
focus-visiblethe attribute data-focus-visible
expandedthe attribute data-state=open
openthe attribute data-state=open
currentthe attribute aria-current=page

Motion

  • The part sets its own motion: add no transition or animation of your own.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/navigation-menu.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-navigation-menu.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.