Dinachi

Navigation Menu

A collection of navigation links with support for dropdown content panels, ideal for site-wide navigation.

View Source

#Installation

npx @dinachi/cli@latest add navigation-menu

#Usage

tsx
import { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuPortal, NavigationMenuPositioner, NavigationMenuPopup, NavigationMenuViewport, NavigationMenuArrow, NavigationMenuBackdrop, NavigationMenuIndicator } from '@/components/ui/navigation-menu'

#Examples

#API Reference

PropTypeDefaultDescription
valueanynullThe controlled value of the navigation menu item that should be currently open.
defaultValueanynullThe uncontrolled value of the item that should be initially selected.
onValueChange(value: any) => voidCallback fired when the active menu item changes.
delaynumber50How long to wait (ms) before opening the navigation menu.
closeDelaynumber50How long to wait (ms) before closing the navigation menu.
orientation'horizontal' | 'vertical''horizontal'The orientation of the navigation menu.
NavigationMenuArrowcomponentRenders an arrow SVG pointing towards the trigger. Place inside Popup.
NavigationMenuBackdropcomponentRenders a backdrop overlay behind the popup. Place inside Portal.