Add System Tray to Tauri App | Show/Hide/Quit Menu Tutorial
128views
2likes
03:16
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Learn how to add a system tray icon to your Tauri desktop application!
In this tutorial, you'll build a menubar app with Show, Hide, and Quit functionality using React, TypeScript, and Rust.
What you'll learn:
• Enable the tray-icon feature in Cargo.toml
• Create tray menu items (Show, Hide, Quit)
• Use TrayIconBuilder to create the tray icon
• Handle menu events to control window visibility
• Build apps that run in the background
Timestamps:
0:00 - Intro
0:08 - Prerequisites Check
0:27 - Project Setup
0:52 - Enable Tray Feature
1:13 - Configure Rust Backend
1:59 - Add Tray Icon
2:20 - App Demo
2:45 - End
Tech Stack:
• Tauri 2.0
• React 19 + TypeScript
• Rust
Key Code:
Enable tray in Cargo.toml:
tauri = { version = "2", features = ["tray-icon"] }
Create tray menu:
let show = tauri::menu::MenuItem::with_id(app, "show", "Show", true, None);
let hide = tauri::menu::MenuItem::with_id(app, "hide", "Hide", true, None);
let quit = tauri::menu::MenuItem::with_id(app, "quit", "Quit", true, None);
Build tray icon:
tauri::tray::TrayIconBuilder::new()
.menu(menu)
.on_menu_event(handler)
.build(app)
Resources:
• Tauri Docs: https://tauri.app
• System Tray Guide: https://tauri.app/develop/system-tray/
Tip: Don't forget to add "use tauri::Manager;" for window access!
#Tauri #Rust #React #DesktopApp #SystemTray #Menubar #TypeScript #Tutorial #Programming
Back to tutorialsOpen in YouTube
Duration
3:16
Published
December 30, 2025
Added to Codegiz
March 15, 2026