Skip to content
Cojeev UI

Navigation Menu

Navigation

Organizes destination links and optional expandable navigation panels.

React · copy into your project · light and dark themes

Try it

Loading preview…

Take it with you

Copy the example, API and usage notes for your editor or AI assistant.

Add to your project

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/navigation-menu.json

The command includes the component’s shared dependencies. Your project keeps editable source files.

Include the complete example

This example also composes card, icon, typography. Install its parts together:

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/navigation-menu.json https://luv-jeri.github.io/cojeev-ui/r/card.json https://luv-jeri.github.io/cojeev-ui/r/icon.json https://luv-jeri.github.io/cojeev-ui/r/typography.json

Using navigation menu

  • Items show stable, varied blob adornments by default. Set adornment={false} to hide, supply {shape,color,icon,effect}, or pass a custom icon element.

  • Use NavigationMenuLink for destinations and set active for the current page.

  • Compose triggers, content, and a viewport when a destination group needs an expandable panel.

API

Compose the exported parts below. The prop types are read from the React source during the registry build.

Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.

NavigationMenuProps

Accepts the native or primitive props declared by its exported TypeScript type.

NavigationMenuListProps

Accepts the native or primitive props declared by its exported TypeScript type.

NavigationMenuItemProps

Accepts the native or primitive props declared by its exported TypeScript type.

NavigationMenuLinkProps

Accepts the native or primitive props declared by its exported TypeScript type.

NavigationMenuGroupProps

Accepts the native or primitive props declared by its exported TypeScript type.

NavigationMenuCountProps

Accepts the native or primitive props declared by its exported TypeScript type.

NavigationMenuTriggerProps

PropTypeRequired
chevronbooleanNo

NavigationMenuContentProps

Accepts the native or primitive props declared by its exported TypeScript type.

NavigationMenuViewportProps

Accepts the native or primitive props declared by its exported TypeScript type.

NavigationMenuIndicatorProps

Accepts the native or primitive props declared by its exported TypeScript type.

NavigationMenuLabelProps

Accepts the native or primitive props declared by its exported TypeScript type.

Accessibility

  • Give the navigation a useful label and use actual links for destinations.

  • Keep current-page state and the supplied trigger behavior when composing custom link content.

States and appearance

selectedresthoverfocusactive

For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.

Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.