DEV Community

Cover image for 16: Tauri vs Electron: Icon Differences and How to Handle Both
Roboticela
Roboticela

Posted on

16: Tauri vs Electron: Icon Differences and How to Handle Both

Tauri has emerged as a compelling Electron alternative for building cross-platform desktop applications with web technologies. Where Electron bundles a full Chromium instance with every application (resulting in 50–150 MB installers), Tauri uses the operating system's native WebView, producing applications that are dramatically smaller and more efficient. Both frameworks are widely used, and both have their own icon requirements that developers must understand.

For developers choosing between the two frameworks, or for those who need to support both (perhaps migrating a codebase or supporting both distributions), understanding their icon systems is essential. The good news: both frameworks ultimately target the same operating systems, so their icon format requirements converge at the OS level. The differences lie in where those icon files must be placed and how they are configured.

Tauri Icon Configuration

Tauri handles icons through the tauri.conf.json configuration file's bundle.icon array. You provide a list of icon file paths, and Tauri's bundler processes them for each target platform. Tauri recommends providing at minimum: a 32×32 PNG, a 128×128 PNG, a 128×128@2x (256×256) PNG, and an ICNS file for macOS, plus an ICO file for Windows.

tauri.conf.json

{
  "bundle": {
    "active": true,
    "icon": [
      "icons/32x32.png",
      "icons/128x128.png",
      "icons/128x128@2x.png",
      "icons/icon.icns",
      "icons/icon.ico"
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

Tauri or Electron? Iconify Handles Both.

Generate correct icon assets for both desktop frameworks from one tool.

Framework Support
Start Generating

Top comments (0)