Electron Tray Icon Setup
OfficialRobust tray icons for Electron apps.
AuthorHNULS-LabHub
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Developers often experience unreliable or missing system tray icons in Electron apps when transitioning from development to packaged builds. Path handling and platform differences can cause icons to fail to render, degrade UX, and complicate distribution.
Core Features & Use Cases
- Platform-aware icon path resolution for dev vs packaged builds across Windows, macOS, and Linux.
- Support for Windows ICO with multiple sizes, macOS Template PNG, and Linux PNG icons.
- Packaging integration with extraResources and lifecycle-safe Tray instantiation, including persistent tray and context menu.
- User interaction patterns including click to show/hide main window and a robust right-click context menu.
Quick Start
Configure the tray icon by loading platform-appropriate icons after app is ready, create a Tray instance with a context menu, and ensure the main window toggles on tray interaction.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: Electron Tray Icon Setup Download link: https://github.com/HNULS-LabHub/HNULS-KnowledgeDatabase/archive/main.zip#electron-tray-icon-setup Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.