Tauri Core API - v2.6.0
    Preparing search index...

    Interface IconMenuItemOptions

    Options for creating a new icon menu item.

    interface IconMenuItemOptions {
        icon?:
            | string
            | number[]
            | ArrayBuffer
            | Uint8Array<ArrayBufferLike>
            | Image;
        id?: string;
        text: string;
        enabled?: boolean;
        accelerator?: string;
        action?: (id: string) => void;
    }

    Hierarchy (View Summary)

    Index

    Properties

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

    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"] }
    id?: string

    Specify an id to use for the new menu item.

    text: string

    The text of the new menu item.

    enabled?: boolean

    Whether the new menu item is enabled or not.

    accelerator?: string

    Specify an accelerator for the new menu item.

    action?: (id: string) => void

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