Context menu

A right-click menu at the cursor.

Right-click anywhere here

With icons

Right-click for an icon menu

Submenu

Right-click → hover “Share”

API reference

Inputs

PropTypeDefaultDescription
itemsreadonly ContextMenuItem[][]Items shown in the menu, in display order.

Outputs

EventPayloadDescription
selectedContextMenuItemEmits the chosen item when a (non-separator) entry is activated.

Types

ContextMenuItem

FieldTypeDescription
label?stringText shown for the menu entry.
value?stringIdentifying value emitted when the item is selected.
shortcut?stringKeyboard shortcut hint shown trailing the label.
danger?false | trueWhether to render the item in the destructive (danger) style.
separator?false | trueWhether this entry is a divider rather than a selectable item.
icon?stringOptional leading icon, given as an SVG path `d` string.
children?ContextMenuItem[]Nested items — rendered as a submenu flyout on hover.

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.