Each root item has kind: link, command or panel. A link needs routerLink or url; a command needs its callback; a panel contains columns, groups and link/command leaves. Give every level a stable key. orientation chooses horizontal or vertical layout; breakpoint enables mobile navigation and scrollHeight limits the panel height.
itemClick emits activated links or commands, not disclosure-only panels. mobileActiveChange reports the mobile menu state. Core owns disclosure/focus and respects disabled entries; the application owns navigation destinations and command work. Start and End Templates add surrounding content. The Item Template receives item, active, index and level (0 for roots, 3 for leaves), not a callback to execute.
Name the navigation and translate menuButtonAriaLabel. Use Tab/Shift+Tab to reach native links and buttons; Enter activates either, while Space activates buttons only. Tab from an open desktop panel trigger enters its first available link or button. Escape closes the panel and restores trigger focus; on the mobile toggle it closes mobile navigation. Arrow keys and Home/End retain browser behavior; this is navigation, not an application menu. Custom Item content remains inside Core links/buttons; Start/End may contain their own accessible controls.
Key
Action
Tab
Reach top-level actions, open-panel links and available mobile controls.
Arrow keys
Keep native browser scrolling; no arrow-key selection model is added to this navigation.
Home / End
Keep native browser behavior; use Tab and Shift+Tab to move between links and buttons.
Enter
Activate the focused native link or button, including a panel trigger.
Space
Activate the focused button or panel trigger; native links use Enter.
Reports whether mobile navigation is open; not a controlled-state Input.
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.
import type { NeuMegaMenuOrientation } from '@neural-ui/core/mega-menu';
// Public declaration (reference only)
export type NeuMegaMenuOrientation = 'horizontal' | 'vertical';
NeuMegaMenuPanel.d.ts
import type { NeuMegaMenuColumn } from '@neural-ui/core/mega-menu';
import type { NeuMegaMenuPanel } from '@neural-ui/core/mega-menu';
// Public declaration (reference only)
export interface NeuMegaMenuPanel {
readonly columns: readonly NeuMegaMenuColumn[];
}
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
--neu-border
Normal control and cell borders
Shared by other Core consumers; scope the override.
rgba(15, 23, 42, 0.08)
--neu-primary
Brand color for active controls and emphasis
Shared by other Core consumers; scope the override.
#007aff
--neu-primary-soft
Subtle selected or active surface
Shared by other Core consumers; scope the override.
var(--neu-primary-50)
--neu-surface
Main field, header or control surface
Shared by other Core consumers; scope the override.
#ffffff
--neu-surface-2
Secondary surfaces and alternating rows
Shared by other Core consumers; scope the override.
#f1f5f9
--neu-text
Main text and inherited icon color
Shared by other Core consumers; scope the override.
#0f172a
--neu-shadow-lg
Surface or overlay elevation
Shared by other Core consumers; scope the override.