Search documentation

Search the documentation and open a page.

A collection of links for navigating websites.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/navigation-menu

Composition

<app-navigation-menu> ├── [appNavigationMenuList] │ ├── [appNavigationMenuItem] │ │ ├── [appNavigationMenuLink] │ │ ├── <button app-navigation-menu-trigger> │ │ └── [appNavigationMenuContent] │ └── [appNavigationMenuPanel] (optional) ├── <app-navigation-menu-indicator> (optional) └── generated viewport | <app-navigation-menu-viewport> (optional)

Examples

Default

Loading...
Loading...

Grid

Loading...

Groups

Loading...

With Icons

Loading...

API Reference

<app-navigation-menu>

Inputs

InputTypeDefaultDescription
idstring | undefinedgeneratedUnique identifier used to create IDs for the navigation-menu parts.
idsPartial<NavigationMenuElementIds> | undefined—Overrides generated identifiers for individual parts.
valuestring | undefined—Open item value when controlled. Supports Angular two-way binding.
defaultValuestring | undefined""Initially open item value when uncontrolled.
orientation"horizontal" | "vertical""horizontal"Sets the menu's orientation and keyboard navigation direction.
openDelaynumber | undefined200Delay in milliseconds before a hovered item opens.
closeDelaynumber | undefined300Delay in milliseconds before an item closes after pointer leave.
disableClickTriggerbooleanfalsePrevents pointer clicks from toggling menu triggers.
disableHoverTriggerbooleanfalsePrevents pointer hover from opening menu items.
disablePointerLeaveClosebooleanfalseKeeps the active item open when the pointer leaves the menu.
translationsNavigationMenuIntlTranslations | undefined—Overrides accessible text used by the navigation menu.
lazyMountbooleanfalseDefers mounting content until it is first opened.
unmountOnExitbooleanfalseRemoves content from the DOM after its exit transition.
viewportbooleantrueRenders the shared generated viewport for item content.

Outputs

OutputTypeDescription
valueChangestring | undefinedEmits the updated controlled open item value.
valueDetailsChangeNavigationMenuValueChangeDetailsEmits details whenever the open item value changes.

[appNavigationMenuItem]

InputTypeDefaultDescription
valuestringrequiredUnique value that identifies the menu item.
disabledbooleanfalsePrevents the item's trigger from being activated.

<button app-navigation-menu-trigger>

InputTypeDefaultDescription
disabledboolean | undefinedfalseDisables the navigation trigger.

[appNavigationMenuContent]

InputTypeDefaultDescription
valuestring | undefinedinferredAssociates content with an item when set outside its context.

Inputs

InputTypeDefaultDescription
valuestring | undefinedinferredAssociates the link with an item when set outside its context.
currentbooleanfalseMarks the link as the current page.
closeOnClickboolean | undefinedtrueCloses the open navigation item when the link is clicked.

Outputs

OutputTypeDescription
selectCustomEventEmits a cancelable selection event when the link is activated.

Context, Providers, and Utilities

ExportAngular API
NavigationMenuRootProviderDirective [navigation-menu-root-provider] providing an externally created API.
NavigationMenuContextStructural directive [navigation-menu-context] exposing the root API to a template.
useNavigationMenu(options)Creates the signal-backed navigation-menu machine in an Angular injection context.
injectNavigationMenuContext()Injects the nearest navigation-menu root context.
injectNavigationMenuContextCarrier()Injects the context carrier used by navigation-menu content.
injectNavigationMenuRenderStrategyContext()Injects the content mounting strategy.
NavigationMenuImportsReadonly collection containing the Angular navigation-menu UI and context helpers.