Skip to main content
Neural UIv2.0.0Documentation
View v1 GitHub

TieredMenu

Browse hierarchical actions through connected submenus with controlled expansion.

Category
Navigation
Import
@neural-ui/core/menu
Selector
neu-tiered-menu
import { NeuTieredMenuComponent } from '@neural-ui/core/menu';

Usage

Use the NeuMenuItem model with stable keys and children. Unlike inline Menu groups, TieredMenu opens child levels in connected overlays. Leaf entries support application commands and link destinations. Hidden, disabled and separator entries retain their menu behavior. neuMenuItem replaces the visible content at every level.

Examples

Try the interaction and open Code for the complete implementation.

Examples

Selected: โ€” ยท itemClick: 0 ยท Commands: 0

Try and configure

Change the options, try the result and see the template update. Open Code for the complete data model and implementation.

Try and configure

Selected: โ€” ยท itemClick: 0 ยท Commands: 0

Core options update this template. Item icons, badges and disabled actions belong to the data model shown in Code.

template.html
<neu-tiered-menu
  [items]="items"
  ariaLabel="Example navigation"
  [expandedKeys]="expandedKeys()"
  (expandedKeysChange)="expandedKeys.set($event)"
  (itemClick)="selectItem($event)"
/>

Data and content

Provide expandedKeys for a controlled open path and accept expandedKeysChange; omit it for internal state. A new branch path replaces the previous sibling path. Leaf activation executes command, emits itemClick and proposes closing all submenus. Pointer interaction outside the menu also proposes closing.

Accessibility and keyboard

Use up/down and Home/End within a level, right/left to enter or return from a submenu (reversed for RTL), and Escape to close the deepest level and restore focus. Typeahead finds labels. Keep custom item content presentational so the owning menu control remains the only focus target.

Key
Action
Tab Enter or leave the available menu actions.
ArrowUp / ArrowDown Move through available actions in the current level.
ArrowRight / ArrowLeft Enter or return from a submenu; directions reverse in RTL.
Home Focus the first available action in the level.
End Focus the last available action in the level.
Enter Activate the focused enabled action or open its group.
Space Activate the focused enabled action or open its group.
Aโ€“Z Find available actions by their label.
Escape Close the deepest open submenu; a popup restores trigger focus.

API

Inputs and Outputs match the installed package. Named types link to definitions. Each available Template/projection has an executable example.

Inputs

Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.

Name
Type
Default
Template binding
Description
ariaLabelstring'Tiered menu'[ariaLabel]Accessible navigation/menu name. Use a label specific to this region.
expandedKeysreadonly string[] | undefinedundefined[expandedKeys]Applied branch keys; undefined enables component-owned expansion.
itemsNeuMenuItem[][][items]Action data with unique keys; children create groups. Core does not mutate this array.

Outputs

Listen to an event with (event)="handler($event)". The table explains the data your handler receives and how to use it.

Name
Payload
Template binding
Description
expandedKeysChangestring[](expandedKeysChange)="onExpandedKeysChange($event)"Proposes the next branch keys. Update expandedKeys to accept a controlled change.
itemClickNeuMenuItem(itemClick)="onItemClick($event)"Emits the activated leaf/action. The optional command runs first; disabled entries do not activate.

Templates

ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.

Name
Mechanism
Contract
ng-template[neuMenuItem] Content projection<ng-content select="ng-template[neuMenuItem]" />
NeuMenuItemDirectiveView example Public template directive (entrypoint)ng-template[neuMenuItem]

Each example demonstrates a different template. Switch between Demo and Code to inspect its implementation, imports and state.

Submenu item content

NeuMenuItemDirective

Submenu item content

Selected: โ€” ยท itemClick: 0 ยท Commands: 0

Public Types

Open a type to inspect its definition and interface fields.

Styles and tokens

Use supported public tokens for the component. Icon resolution and surrounding example layout belong to the application. Check both themes and narrow screens.

Specific tokens

This component uses shared theme tokens rather than dedicated component hooks.

Shared tokens used

Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.

Token
Purpose here
Other impact
Default / fallback
No data