Skip to content

NavigationMenu

A website-style multi-level navigation bar: top-level triggers open a unified viewport panel (mega-panel multi-column link cards) on hover/click, with delayed open/close, a controlled open value, and full keyboard navigation. Leaf items with href render as links.

Basic usage (mega panel)

Basic usage

Nothing selected

Controlled open (value + oas-change)

Controlled open

Open ProductsOpen ResourcesClose
Currently open: products

Delayed open/close

Delayed open/close

Vertical orientation

Vertical

Multi-column grid

Multi-column grid (columns=3)

Backdrop + keep-mounted + arrow

Backdrop + keep-mounted + arrow

backdrop shows an overlay when open; keep-mounted keeps the panel DOM after closing; arrow shows the pointer arrow.

Disabled items

Disabled items

API

Attributes

AttributeDescriptionTypeDefault
arrowPointer arrow on the popup, shown by default; arrow="false" hides itstringtrue
backdropShow an overlay when open (clicking the overlay closes)boolean
columnsPanel grid columns, default 2 (mega-panel multi-column link cards)string2
delay-durationHover open/close delay in ms, default 200; clicks and keyboard are immediatestring200
itemsNavigation items JSON (hierarchical; leaf items can carry description text and an icon to render mega-panel link cards)string[]
keep-mountedKeep the panel DOM mounted when closed (crawler/SEO indexing)boolean
orientationLayout direction: horizontal (default) / vertical (panel appears to the right of triggers)stringhorizontal
skip-delay-durationSkip-delay window in ms, default 300: hovering another trigger within this window after a close opens it immediatelystring300
valueControlled open item (top-level trigger value; empty string = closed; when present the open state follows the attribute and interactions only dispatch oas-change for the host to update)string

Events

EventDescription
oas-changeThe open item changed, detail: { value } (value is the open top-level item value; empty string = closed)
oas-selectAn item was selected (top-level leaf link or panel link card), detail: { value }

NavItem fields (inherits MenuItem):

FieldDescriptionType
labelNavigation textstring
valueSelection valuestring
hrefLink URL (optional); leaf items with href render as <a> and are navigablestring
targetLink open target (optional)string
iconIcon name (optional); panel link-card iconstring
descriptionLink-card description (optional); rendered under the title in mega-panel modestring
activeCurrent-page marker (optional); renders aria-current="page" on the linkboolean
disabledDisabledboolean
childrenSub navigation items (optional); a top-level item with children opens the mega panel, and panel children with children render as an inline secondary sub-navNavItem[]

Interaction: hover (after delay-duration) / click a top-level trigger to open the unified viewport panel; click a panel link card to select and fire oas-select; the open item change fires oas-change. Clicking outside closes; Esc closes the panel; / (vertical /) switch top level, (vertical ) opens the panel and focuses the first item, / move within the panel, expands an inline secondary sub-nav, Enter selects; while the panel is open Tab cycles among panel items (focus trap).

Released under the MIT OR Apache-2.0 License.