Angular Navigation Menu Component | ng-hub-ui-nav

Angular navigation component with dropdowns, drill-down panels, responsive collapse, router integration and CSS-variable theming.

API reference

Here's the full contract for nav: everything you can bind, listen to, project and theme, gathered in one place. Wire up what you need and style what you want — it's standalone and signal-friendly.

Inputs

Dial nav in with 4 inputs. Bind them like any Angular @Input.

NameTypeDefaultDescription
itemsRequiredHubNavItem[]Array of navigation items to render. Each item defines its type (link, dropdown, header, separator, custom), label, route, icon, badge, children, and more.
configPartial<HubNavConfig>{}Partial configuration overrides merged with global defaults. Controls orientation, dropdown trigger, collapse mode, breakpoint, position, and more.
navClassstring''Additional CSS class applied to the nav container element.
itemTemplateTemplateRef<HubNavItemTemplateContext> | nullnullOptional custom template for rendering nav items via input binding. The hubNavItemTemplate directive takes priority over this input.

Outputs

React to what nav does — 5 events to hook your logic onto.

NameTypeDescription
itemClickOutputEmitterRef<HubNavItem>Emitted when a link item is clicked. Provides the clicked HubNavItem.
dropdownOpenOutputEmitterRef<HubNavItem>Emitted when a dropdown item is opened.
dropdownCloseOutputEmitterRef<HubNavItem>Emitted when a dropdown item is closed.
mobileToggleOutputEmitterRef<boolean>Emitted when the mobile panel is toggled. Provides true when open, false when closed.
panelChangeOutputEmitterRef<HubNavPanelEvent>Emitted when a panel is opened, closed, drilled-down, or navigated back. Provides the item, panel index, and action type.

Templates

Make it yours — 3 template slots let you project custom markup.

NameDescriptionExample
hubNavStartProjects custom content in the start slot. Horizontal: visual start (left in LTR, right in RTL). Vertical: top of the primary column.<hub-nav [items]="items"> <ng-template hubNavStart let-collapsed="collapsed"> <img src="logo.svg" alt="Brand" /> @if (!collapsed) { <span>App Name</span> } </ng-template> </hub-nav>
hubNavEndProjects custom content in the end slot. Horizontal: visual end (right in LTR, left in RTL). Vertical: bottom of the primary column.<hub-nav [items]="items"> <ng-template hubNavEnd> <button type="button">Sign out</button> </ng-template> </hub-nav>
hubNavItemTemplateOverrides the default item rendering with a custom template. Receives HubNavItemTemplateContext with $implicit (item), active, expanded, and depth properties.<hub-nav [items]="items"> <ng-template hubNavItemTemplate let-item let-active="active"> <span [class.fw-bold]="active">{{ item.label }}</span> @if (item.badge) { <span class="badge">{{ item.badge }}</span> } </ng-template> </hub-nav>