Skip to content
Tauri

IconMenuItemOptions

Defined in: menu/iconMenuItem.ts:133

Options for creating a new icon menu item.

optional accelerator: string

Defined in: menu/menuItem.ts:17

Specify an accelerator for the new menu item.

MenuItemOptions.accelerator


optional action: (id) => void

Defined in: menu/menuItem.ts:19

Specify a handler to be called when this menu item is activated.

string

void

MenuItemOptions.action


optional enabled: boolean

Defined in: menu/menuItem.ts:15

Whether the new menu item is enabled or not.

MenuItemOptions.enabled


optional icon: string | number[] | ArrayBuffer | Uint8Array<ArrayBufferLike> | Image

Defined in: menu/iconMenuItem.ts:144

Icon to be used for the new icon menu item.

Note that you may need the image-ico or image-png Cargo features to use this API. To enable it, change your Cargo.toml file:

[dependencies]
tauri = { version = "...", features = ["...", "image-png"] }

optional id: string

Defined in: menu/menuItem.ts:11

Specify an id to use for the new menu item.

MenuItemOptions.id


text: string

Defined in: menu/menuItem.ts:13

The text of the new menu item.

MenuItemOptions.text


© 2025 Tauri Contributors. CC-BY / MIT