Navigation Menu

A collection of links for navigating sections, dropdown panels, and top-level actions.

Installation

$npx maddex add NavigationMenu

Basic Navigation

Start with the default uncontrolled composition from shadcn: triggers own their content panels, and direct links can sit beside them in the same list.

Preview

        
            
        
    

Trigger-Style Links With as-child

Use as-child when the top-level item should render a real anchor while keeping the same trigger-style presentation as the menu buttons.

Preview

        
            
        
    

Inline Panels Without Viewport

Disable the shared viewport when each panel should stay attached to its trigger like a compact marketing or docs navigation strip.

Preview