TrayIconOptions
Defined in: tray.ts:74
`TrayIcon` creation options
optional
action: (event
) =>void
Defined in: tray.ts:137
A handler for an event on the tray icon.
void
optional
icon: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"] }
optional
iconAsTemplate:boolean
Defined in: tray.ts:115
Use the icon as a template. macOS only.
optional
id: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
optional
menuOnLeftClick:boolean
Defined in: tray.ts:125
Whether to show the tray menu on left click or not, default is true
.
- Linux: Unsupported.
optional
showMenuOnLeftClick: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
optional
tempDirPath: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
.
optional
title: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.
optional
tooltip:string
Defined in: tray.ts:91
The tray icon tooltip
© 2025 Tauri Contributors. CC-BY / MIT