NEURALNG

API

Public contract

Data, projected composition, state models and semantic events share one typed contract.

Inputs and models

NameTypeDefaultPurpose
itemsreadonly NeuralPanelMenuEntry[][] Immutable data-driven hierarchy.
expandedKeysmodel<readonly string[]>[] Stable keys of expanded branches.
multiplebooleanfalse Allows several root branches to remain expanded.
disabledbooleanfalse Disables the complete hierarchy.
panelMenuIdstringgenerated Stable root ID used by item and group relationships.
ariaLabelstring | nullnull Accessible tree name.
ariaLabelledbystring | nullnull ID of an external accessible label.
unstyledbooleanfalse Removes NeuralNg visual classes.
panelMenuClassstring'' Additive class on the tree root.
classesNeuralPanelMenuClasses{} Typed additive classes for internal slots.

Events

expandedKeysChangereadonly string[]

Implicit model output after expansion changes.

itemSelectNeuralPanelMenuSelect

Enabled leaf activation with pointer/keyboard source.

itemToggleNeuralPanelMenuToggle

Branch state change with previous and next key sets.

Entry model

NeuralPanelMenuAction supports key, label, iconClass, badge, shortcut, disabled, href, routerLink and its Router options, target, rel, itemClass and recursive items. A separator uses { separator: true }.

Typed class slots

root

Tree root.

list

Top-level item collection.

itemContainer

Item and optional child-group wrapper.

item

Native button or anchor.

expandedItem

Expanded branch state.

disabledItem

Disabled item state.

icon

Leading Neural icon.

label

Item text.

meta

Badge, shortcut and indicator wrapper.

badge

Optional count or status.

shortcut

Optional keyboard hint.

indicator

Branch disclosure indicator.

group

Animated child group.

groupInner

Overflow-clipping group interior.

separator

Semantic separator.