Skip to content

Vizel API / core/src / VizelMenuItemSpec

Interface: VizelMenuItemSpec<TData>

Defined in: packages/core/src/builders/types.ts:71

A single item slot in the menu spec.

The spec carries the identifying shape: a stable key, ARIA attrs, selection / disabled flags, plus an index into the original item array so the framework component can call its existing selectItem(index) from the click / Enter handler. Item rendering (icon, label, description, etc.) is the component's job — the spec passes the original item view back through data.

Type Parameters

Type Parameter
TData

Properties

attrs

ts
attrs: VizelMenuItemAttrs;

Defined in: packages/core/src/builders/types.ts:77

ARIA attributes for the item element.


data

ts
data: TData;

Defined in: packages/core/src/builders/types.ts:79

Item-specific data (label, icon name, etc.) passed to the consumer.


index

ts
index: number;

Defined in: packages/core/src/builders/types.ts:75

Original-array index for activation wiring.


key

ts
key: string;

Defined in: packages/core/src/builders/types.ts:73

Stable key (used as React/Vue/Svelte iteration key).

Released under the MIT License.