Navigation

Navigation menu

@xui/navigation-menu

A horizontal nav where items open a rich dropdown "mega menu". Panels open on hover or focus and share one viewport under the bar; items with an href and no template are plain links.

Install

pnpm add @xui/navigation-menu

Add the barrel to a standalone component's imports:

import { XuiNavigationMenuImports } from '@xui/navigation-menu';

@Component({
  imports: [XuiNavigationMenuImports],
  // …
})

Examples

Basic

Loading preview…

API

XuiNavigationMenuItem

componentxui-navigation-menu-item

One entry of an {@link XuiNavigationMenu}. Give it a trigger label and a value. Project an <ng-template> to make it a dropdown panel; give it an href (and no template) to make it a plain link.

Inputs

NameTypeDefaultvaluerequiredstringThe item's key, used by the menu to track which panel is open. Must be unique within the menu.triggerstringThe label shown in the menu bar. Project content for the panel it opens.''hrefstringTurns the item into a plain link rather than a panel trigger. Use it for a top-level entry with nothing beneath it.''

XuiNavigationMenu

componentxui-navigation-menu

A horizontal navigation bar where items can open a rich dropdown panel — a "mega menu". Panels open on hover or focus and share one viewport beneath the bar; a padded bridge keeps the panel reachable across the gap. Items with an href and no template render as plain links.

Inputs

NameTypeDefaultclassClassValueExtra classes, merged into the component's own rather than replacing them.''

Source

libs/ui/navigation-menu/xui

xUI 2.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.