Optional
idThe tray icon id. If undefined, a random one will be assigned
Optional
menuThe tray icon menu
Optional
iconThe 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
tooltipThe tray icon tooltip
Optional
titleThe tray title
Optional
tempThe 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
iconUse the icon as a template. macOS only.
Optional
menuWhether to show the tray menu on left click or not, default is true
.
use TrayIconOptions.showMenuOnLeftClick
instead.
Optional
showOptional
actionA handler for an event on the tray icon.
TrayIcon
creation options