CommandMenuSettings

23 Sep 20251 minute to read

Represents the settings for the command menu in the block editor component

Properties

commands CommandItemModel[]

Specifies an array of command item models representing the available commands in the menu.
This property holds the list of commands that appear in the menu.

Defaults to []

enableTooltip boolean

Specifies whether the tooltip is enabled for the command menu.
If set to true, tooltips will be displayed based on the tooltip property of the command item.

Defaults to true

popupHeight string

Specifies the height of the command menu popup.
Accepts valid CSS height values such as px, %, auto, etc.

Defaults to ‘300px’

popupWidth string

Specifies the width of the command menu popup.
Accepts valid CSS width values such as px, %, auto, etc.

Defaults to ‘280px’

Events

close EmitType<CommandMenuCloseEventArgs>

Specifies the event triggered when the command menu closes.

itemClicked EmitType<CommandItemClickedEventArgs>

Specifies the event triggered when a command item is clicked.
This event can be used to perform actions based on user interaction.

open EmitType<CommandMenuOpenEventArgs>

Specifies the event triggered when the command menu opens.

queryFiltering EmitType<CommandQueryFilteringEventArgs>

Specifies the event triggered for filtering commands based on the query input.