Skip to content

Vizel API / core/src / VizelBlockMenuSpec

Interface: VizelBlockMenuSpec

Defined in: packages/core/src/builders/block-menu.ts:56

The complete block-menu skeleton: main menu + submenu trigger + submenu.

The main menu's sections come from groupVizelBlockMenuActions. The framework component renders a divider between adjacent sections. The submenu trigger sits after all action sections; the submenu itself is rendered conditionally when showTurnInto is true and it has items.

Properties

root

ts
root: object;

Defined in: packages/core/src/builders/block-menu.ts:58

Main menu root attrs (role="menu", aria-label).

aria-label

ts
aria-label: string;

role

ts
role: "menu";

tabIndex

ts
tabIndex: -1;

sections

ts
sections: readonly VizelMenuSectionSpec<VizelBlockMenuItemView>[];

Defined in: packages/core/src/builders/block-menu.ts:60

Action groups (rendered with a divider between adjacent sections).


ts
submenu: VizelMenuSpec<VizelBlockMenuTurnIntoItemView>;

Defined in: packages/core/src/builders/block-menu.ts:67

"Turn into" submenu spec. Empty sections array means the consumer should skip rendering the submenu (no available target node types).


ts
submenuTrigger: VizelBlockMenuSubmenuTriggerSpec;

Defined in: packages/core/src/builders/block-menu.ts:62

"Turn into" submenu trigger.

Released under the MIT License.