TrayIconOptions
Defined in: tray.ts:74
`TrayIcon` creation options
optionalaction: (event) =>void
Defined in: tray.ts:137
A handler for an event on the tray icon.
void
optionalicon:string|number[] |ArrayBuffer|Uint8Array<ArrayBufferLike> |Image
Defined in: tray.ts:89
The tray icon which could be icon bytes or path to the icon file.
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"] }
optionaliconAsTemplate:boolean
Defined in: tray.ts:115
Use the icon as a template. macOS only.
optionalid:string
Defined in: tray.ts:76
The tray icon id. If undefined, a random one will be assigned
Defined in: tray.ts:78
The tray icon menu
optionalmenuOnLeftClick:boolean
Defined in: tray.ts:125
Whether to show the tray menu on left click or not, default is true.
- Linux: Unsupported.
optionalshowMenuOnLeftClick:boolean
Defined in: tray.ts:135
Whether to show the tray menu on left click or not, default is true.
- Linux: Unsupported.
2.2.0
optionaltempDirPath:string
Defined in: tray.ts:111
The tray icon temp dir path. Linux only.
On Linux, we need to write the icon to the disk and usually it will
be $XDG_RUNTIME_DIR/tray-icon or $TEMP/tray-icon.
optionaltitle:string
Defined in: tray.ts:104
The tray title
- Linux: The title will not be shown unless there is an icon as well. The title is useful for numerical and other frequently updated information. In general, it shouldn’t be shown unless a user requests it as it can take up a significant amount of space on the user’s panel. This may not be shown in all visualizations.
- Windows: Unsupported.
optionaltooltip:string
Defined in: tray.ts:91
The tray icon tooltip
© 2025 Tauri Contributors. CC-BY / MIT