Navigation Menu
NavigationOrganizes destination links and optional expandable navigation panels.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/navigation-menu.jsonThe 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:
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.jsonUsing 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
| Prop | Type | Required |
|---|---|---|
chevron | boolean | No |
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
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.