Hacker News new | ask | show | jobs
by jorisw 3 hours ago
> Web technology is the most widely-known UI toolkit in the world.

Poor choice of words there IMHO.

The reason Electron apps get a lot of flak is because they are everything _but_ a UI toolkit. They consistently miss the mark in adopting UI patterns from their host OS.

Web tech is just web tech. Yes it will allow you to render a button, but even unstyled, the button won't necessarily look native to the OS, and will vary between browsers.

13 comments

That is not why people use Electron. The goal is not and never was to just be a "UI toolkit" and "adopting UI patterns from their host OS".

Chromium has so much stuff packed into it, its insane. All that utility comes with Electron. And that's a good thing.

If you ever worked with video, for example, you know that having the full power of a modern browser in a desktop app is a game changer. Video playback (not to mention transcoding, which is also possible with modern web and webcodecs) is a complex beast, implementing that yourself is massive undertaking, not to mention in a desktop app that is supposed to work on win/mac/lin. I've built apps with Electron in tens of hours that would otherwise take me tens of days or more (and thats with AI because I'm not a video expert).

gstreamer is not that complicated
chromium is basically operating system at this point, it lacks kernel and ability to boot independently (added in chromium os), which is both good (from abilities standpoint) and bad (when copy of chromium is bundled with every app that renders webform with text field and button and nothing else)

when it goes about using webapps as desktop apps, native PWA support should be used, it would - in theory at least - lessen most issues electron apps have but will need extra effort and that's why we can't have nice things (like RAM free for other tasks)

> chromium is basically operating system at this point

I get what you're trying to say, but Chromium is far from being an OS. What you could say is, Chromium is as complex as an OS, or is replacing the OS in providing functional libraries atop devices (OS-provided application framework, if you will).

How is it a poor choice of words? It might not be "native" UI, but they never claimed as such.

I've always felt that native UI on Linux always looks incredibly ugly and I'd much rather use a nicely styled HTML+CSS layout instead.

In my experience, Electron mostly gets flak for being bloated and slow, it not being native is sometimes a secondary point people add on top.

I've always wanted to build a direct-browser integration that could use HTML+CSS for the layout, but avoids needing a JS runtime. Idk how lightweight servo is but one day I hope I will see my idea come to light

I don't mind the idea of using HTML components and widgets to style desktop applications. CSS and the DOM are widely known and reusing those for desktop apps is probably a good idea.

The problem, as you've pointed out, is that electron apps are bloated and slow. If they became the default and my editor, chat client, terminal, and everything else that I keep open were just thin layers around web applications, I'd rather figure out a way to move things into a browser rather than pull a piece of the browser out to wrap these applications.

There’s a point where it stops scaling in the browser, whether it’s due to scale or poor practices. For example Slack is annoyingly slow to start up and work in my FF, but works OK as an Electron app.
This is pretty much what Tauri solves. It re-uses the systems WebView. So the built apps are tiny (kb to a few mb)
Looking native has long left the station as an objection about a UI.

Like 25 years ago. Nobody gives a damn since Microsoft stopped giving a damn.

I'm not part of the Apple world, but I thought they gave a damn?
Depends on the tool. We (mac people) tend to prefer native toolbars and settings menus, but I would say the days of relying on a "native" textarea or button are now behind us.

The other thing I find most Mac people appreciate is a shared understanding of hotkeys and if your app goes against the norm, one of the first feature requests will be to add configurable hotkey support.

Unfortunately, Apple has dropped the ball with their newest native apps in regards to UX and it will take years for them to go back and improve things. The new OS this fall is aiming to start that process, but it will still be a band-aid in some respect.

Nah they stopped caring as well. Developing an application for macOS is hell nowadays. I hate the state of things but both Apple and Microsoft dropped the ball. Linux is even worse, so yeah I don't see a reality out of this unless we actually create something that surpasses the web in all measures.
Liquid Glass says no, they don't give a flying fuck any more.
Every time I use Zed across Linux, macOS and Windows , I'm amazed stable and performant it's GPUI framework is. As a user, I'm very happy with it; of course some basic features like accessibility is missing but I'm sure it will be implemented soon.

As a developer, I'm not sure what's the barrier for entry is apart from Rust then again it's the USP as well.

For me it's not stable. After they change their renderer from one to another it freezes for me from time to time. But on the other hand I'm running Nvidia on Wayland so I feel no hate towards Zed owners - and restart is super quick ;)
Interesting, I'm on Nvidia in Wayland most of the time too and haven't had single freeze or crash in a very long time. Even the Windows is running inside the Qemu.

What DE? I'm on KDE.

Live reload. GUI development in compiled languages is a pain compared to web development.
Try dioxus, it has live reload but it's a work in progress.
Dioxus seems to be 'just' another way to generate HTML on the desktop. Electron but Rust? Is there a legitimate upside there?
With Dioxus, program logic compiles to native code instead of running it through a JS engine, and it ships its own HTML renderer (Blitz) instead of bundling a whole browser. So it's a lot more lightweight and performant than Electron.

As a minor bonus, the live-reload is also faster than what frameworks like React do. It truly has subsecond latency, which isn't exactly a game changer but is nice when iterating on visual details of an app.

Sounds similar to Wails. It does the same but with Go instead of Rust.
> basic features like accessibility is missing but I'm sure it will be implemented soon.

Accessibility implementations frequently are more complex than the entire UI drawing bits. Most custom UI toolkits never implement accessibility, even decades after creation.

That hope is misplaced.

I agree about the complexity, but the core developers understand that the accessibility support is crucial and that's where my hope comes from.

[1] https://github.com/zed-industries/zed/discussions/6576

At this point the only OS with a consistent look and feel at all is Mac. For the other OSes, I don't even know what a "native" look and feel would be. And most apps have their own branding and style they want to tout anyway. So I don't think "apps should look native" is the leading reason to not use Electron.

For me, the leading reason to use Electron is the fact that I already have a browser running so why not just use that to render your webpage... Make it a PWA if you want it in its own window.

> Make it a PWA if you want it in its own window.

Seems like I'm part of a shrinking minority (in this thread at least) who believes that web[sites/apps] in a browser, and apps running on the host platform, are different things in terms of UX expectations.

Who cares if it looks native?

Native UIs change all the time too and not always for the better.

Change over time is something different from apps looking vastly different at any given time.
> They consistently miss the mark in adopting UI patterns from their host OS.

What you suggest is a disadvantage is one of the key advantages of Electron to me. I precisely do not want my things to look different on different OS. I don't have the resources to test my apps on all devices, and knowing that whatever I test on one system looks the same on another is A+.

That's an advantage to you. Not necessarily to your users.
The alternative is not that users get a UI specific for their OS, it is that users get nothing since I do not have the resources to develop for multiple systems. So yes, it is also an advantage to users.
> look native to the OS

Is that a problem? A button with a legible label is a button. The host OS doesn't have to look exactly like the applications it runs.

Consistency is a large factor in any good design, UI design more so.
Consistent like what? Like maybe a decade ago one could say that osx was consistent, but nowadays even SwiftUI and cocoa is visibly different, let alone every second app that uses electron. And people don't care.

Windows has like 4 frameworks available on a bare new, latest OS install, just go deep enough in the "settings" or whatever they call it, and you can reach down to winforms. And on top the start menu is a react element!

(And in Linux you have the gtk and the qt world, and everything else)

> SwiftUI and cocoa is visibly different

Do they render different looking buttons?

They have internal consistency. The iOS version looks like the macos version which looks like the web version, etc.

This upsets HN users but the rest of the world decided that apps looking like windows built ins doesn't matter.

It's more like developers decided - nobody asked the users.
ironically the only group of users I've found that actually care about native UI, are other developers and Mac purist.
I have seen users having trouble with pixel soup UIs. They may not think "This should be in a native toolkit", but they do think "How the hell do I subscribe to a folder in the new Outlook?".
OS-level consistency is also consistency. It depends what we value. A lot of apps’ design could’ve been basic, OS-like UI. Apps such as GymBook or WhatsApp are internally consistent while still adopting many elements from the system’s design, instead of reinventing the wheel.
There are two types of consistency in this context: consistency within an OS and consistency across them. I, too, prefer the first because I only really use one OS, but this preference varies. I don't think it's right to say that the first case = "ui toolkit", but the second case doesn't.
Consistency as a design virtue applies to a single user's experience. This means consistency within the OS.
Within OS consistency is much less of thing a thing than Web design conventions. Windows by itself has had several different UI frameworks over the years, so different "native" Windows programs can look completely different from each other.
> Within OS consistency is much less of thing a thing than Web design conventions.

Sorry, are you saying that two random web apps will typically share more UI consistency than two random Windows apps? Because, although I'm not currently familiar with Windows, I would be amazed if that were true.

Consistency is the reason why Electron is great. Consistency of the UI across operating systems.
Great for the developer. The user doesn’t use Mac, Windows and Linux. Just one for work and one at home, with mostly different apps, so they couldn’t care less if it looks the same on different platforms.
They may care, however, if they get anything at all. I do not have the resources to target something to all platforms, so the alternative wouldn't be "Users get UI targeted towards their OS", the alternative would be "Users get nothing since developers don't have the time to also target their system".
If you think operating systems have nothing to offer in terms of UI patterns or guidance, then yes, that's a different type of consistency.
That’s why HN users constantly advocate for Vim, a program in which every single thing works completely differently from every other modern application.
Yes, if there's one lesson from historical UI research that still holds, it's that mode switching is expensive. That's why people install vi plugins everywhere.

Wait...

A foolish consistency with terribly designed shallow superficial desktop user interfaces dreamed up by overpaid cocaine addled corporate boutique brand designers with not only no experience but actual burning contempt for usability and human factors and accessability and affordances is the hobgoblin of little minds.

https://daringfireball.net/2025/12/bad_dye_job

Yes, Dye botched [mac/i/tv/etc]OS 26.

That doesn't say anything about the value of whatever UI kit is in place, being shared consistently by apps. A virtue that, apparent from this thread, is no longer universally shared.

> Web tech is just web tech. Yes it will allow you to render a button, but even unstyled, the button won't necessarily look native to the OS, and will vary between browsers.

The irritating, and unnecessary, pedantry.

Indeed. Even Qt isn't native, in the most purist sense.
Yeah, it is mostly laziness and cost cutting at the expense of users.

Nowadays there isn't even an excuse anymore, just vibe code it away in native frameworks.

Which native framework?

Even in a "post-vibe code" era I wouldn't want to create multiple versions of the same app, and none of the "platform-native" GUI toolkits run on everything.

SwiftUI is apple-only, gtk has pretty bad compatibility on non-linux, qt is decent but requires C++ or python, and even so still not much for mobile. Don't even get started on "Windows frameworks", because as I write this sentence they may have left a new one in the ditch.

Flutter may be the closest, but why didn't they go with e.g. Java instead of a new language?

So yeah, if you want a truly universal UI then web is your best bet.

> if you want a truly universal UI

Right. If you want your app to look the same, custom way, ditching what the OS has to offer.

Some developers still believe an operating system has useful UI components and patterns worth adopting. From this thread it's clear that there's plenty who don't. Personally I view that as a regression.

I never thought I'd defend Electron, but I'd rather use the bloated web UI than a vibe coded Qt/GTK version I'm positive will not have seen any human QA.
But GIMP! /s
When I can modify my desktop/theme (KDE) with css I will happily start doing it since that sounds easy.
Styling every application independently because it’s all individual Electron UI without a shared toolkit is much better indeed…
I have better things to do than spend my time adopting UI for various different systems. If Electron gives me the option to easily create a UI that looks the same everywhere, then I'll pick Electron over anything else any day.
> UI patterns from their host OS

I genuinely wonder who ever want that, and what apps those people use on their PC. Can you imagine, for example, Blender Foundation says that their next goal is to make Blender's UI look more like the host OS?

Since when did anyone ever complain that youtube, google maps, roblox, or any other web sites didn't have native buttons and UI patterns?

Are you implying that the Windows, Mac, and Linux native desktop user interfaces don't all totally suck??! Or that there wasn't a huge celebration when Alan Dye finally left Apple for Meta? Or that users are clamoring for Jony Ive's infamous shallow superficial visual elegance over affordance and discoverability and usability?

Is it just too confusing for people to use youtube because the buttons don't look and feel exactly like native Mac buttons on the Mac and native Windows buttons on the Windows and whatever the kids are using on Linux desktops these days, therefore nobody uses youtube, and that it will only ever get popular if it just had a native look and feel?

Basically you're saying websites are the same as apps, and whether they're used in the browser or as a desktop app, the UI is fine to ditch that of the OS. Fine if you think so. I'll be sad to see OS and apps diverge completely in terms of UI.
YouTube succeeds for its content. Its UI is hot garbage both in the web and their apps. Google Maps is an atrocity and I’m very thankful Apple has decent data where I live. Roblox I don’t know, other websites I consume mostly in Reader mode.
None of that changes whether it's a UI toolkit, which it surely is.