Loading...
Installation
Install the following dependencies:
Copy and paste the following code into your project.
Loading...
Update the import paths to match your project setup.
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...
Featured
Loading...
Grid
Loading...
Groups
Loading...
With Icons
Loading...
API Reference
<app-navigation-menu>
Inputs
| Input | Type | Default | Description |
|---|---|---|---|
id | string | undefined | generated | Unique identifier used to create IDs for the navigation-menu parts. |
ids | Partial<NavigationMenuElementIds> | undefined | — | Overrides generated identifiers for individual parts. |
value | string | undefined | — | Open item value when controlled. Supports Angular two-way binding. |
defaultValue | string | undefined | "" | Initially open item value when uncontrolled. |
orientation | "horizontal" | "vertical" | "horizontal" | Sets the menu's orientation and keyboard navigation direction. |
openDelay | number | undefined | 200 | Delay in milliseconds before a hovered item opens. |
closeDelay | number | undefined | 300 | Delay in milliseconds before an item closes after pointer leave. |
disableClickTrigger | boolean | false | Prevents pointer clicks from toggling menu triggers. |
disableHoverTrigger | boolean | false | Prevents pointer hover from opening menu items. |
disablePointerLeaveClose | boolean | false | Keeps the active item open when the pointer leaves the menu. |
translations | NavigationMenuIntlTranslations | undefined | — | Overrides accessible text used by the navigation menu. |
lazyMount | boolean | false | Defers mounting content until it is first opened. |
unmountOnExit | boolean | false | Removes content from the DOM after its exit transition. |
viewport | boolean | true | Renders the shared generated viewport for item content. |
Use [(value)]="value" for two-way binding, or pair [value] with (valueChange) when using
signals.
Outputs
| Output | Type | Description |
|---|---|---|
valueChange | string | undefined | Emits the updated controlled open item value. |
valueDetailsChange | NavigationMenuValueChangeDetails | Emits details whenever the open item value changes. |
[appNavigationMenuItem]
| Input | Type | Default | Description |
|---|---|---|---|
value | string | required | Unique value that identifies the menu item. |
disabled | boolean | false | Prevents the item's trigger from being activated. |
<button app-navigation-menu-trigger>
| Input | Type | Default | Description |
|---|---|---|---|
disabled | boolean | undefined | false | Disables the navigation trigger. |
[appNavigationMenuContent]
| Input | Type | Default | Description |
|---|---|---|---|
value | string | undefined | inferred | Associates content with an item when set outside its context. |
[appNavigationMenuLink]
Inputs
| Input | Type | Default | Description |
|---|---|---|---|
value | string | undefined | inferred | Associates the link with an item when set outside its context. |
current | boolean | false | Marks the link as the current page. |
closeOnClick | boolean | undefined | true | Closes the open navigation item when the link is clicked. |
Outputs
| Output | Type | Description |
|---|---|---|
select | CustomEvent | Emits a cancelable selection event when the link is activated. |
Context, Providers, and Utilities
| Export | Angular API |
|---|---|
NavigationMenuRootProvider | Directive [navigation-menu-root-provider] providing an externally created API. |
NavigationMenuContext | Structural 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. |
NavigationMenuImports | Readonly collection containing the Angular navigation-menu UI and context helpers. |
Angular
React
Solid
Svelte
Vue