name thatuiuser interface

Swift vs Electron

/ native · web-in-a-shell /

This is the first fork in the road when you build a desktop app. Swiftmeans building with Apple’s own materials — the app isa Mac app, and every element on this site’s macOS tab comes free and native. Electronmeans building a web page and shipping it inside its own private browser window — the app is really a website wearing a desktop coat, and its vocabulary is this site’s Web tab.

Neither is wrong. It decides which names your project speaks: an Electron app has no NSStatusItem inside it (Electron calls the menu bar icon a Tray), and a Swift app has no CSS.

The trade, honestly

Swift (native)Electron (web shell)
What it isApple's language + native frameworks (SwiftUI/AppKit)A Chromium browser + Node.js bundled around your web app
Looks like a Mac appYes, automatically — real menus, sheets, vibrancyOnly if you rebuild the Mac look yourself in CSS
UsesMac-only apps that should feel nativeCross-platform apps sharing one web codebase
App sizeSmall (uses the system's own frameworks)Large (ships its own browser, ~100MB+)
Your skillsSwift — new language for most web devsHTML/CSS/JS/React — what web devs already know
Famous examplesThings, Fantastical, CraftVS Code, Slack, Discord, Figma

Rule of thumb

Mac-only and you want it to feel like it belongs? Swift. Cross-platform, or your team lives in web tech? Electron (or its lighter cousin Tauri, which swaps the bundled browser for the system’s).

Your first prompt — pick your world

The very first message you send decides which world your agent builds in. Paste the one for your side — it sets the stack, the native details agents forget, the vocabulary, and a first milestone you can actually see:

Starting a Swift appMac-only, feels native from day one

I'm starting a brand-new native macOS app. Set it up as a SwiftUI Mac app (Xcode project, macOS 14+): one main window with a NavigationSplitView sidebar, a unified toolbar, and light + dark mode from the start. Keep everything native — system fonts, system accent color, standard controls, no custom-drawn chrome. Talk to me in SwiftUI/AppKit names (window, sidebar, toolbar, sheet), never in web terms. First milestone: the empty app builds and runs with the sidebar and toolbar showing.

Starting an Electron appWeb tech, runs everywhere

I'm starting a brand-new desktop app built with web tech. Set it up as an Electron app with Vite + React + TypeScript: one BrowserWindow with titleBarStyle 'hiddenInset' on macOS so it looks clean, secure defaults (contextIsolation on, nodeIntegration off), and hot reload in dev. Talk to me in web names (components, CSS, div — and Electron's Tray for a menu bar icon), never in Swift/AppKit terms. First milestone: the window opens, shows my React page, and hot reload works.

Don’t confuse them with

TauriElectron's lightweight cousin — same web UI, much smaller app, Rust underneath.
CatalystAn iPad app running on the Mac. Neither native-Mac nor web.
React NativeJavaScript driving native controls — mostly a mobile story, rare on desktop.

Chose Swift? Read AppKit vs SwiftUI next. Chose Electron? Everything you build lives in the Web tab.

Search

Describe the UI element you're thinking of