I tried making a UI Library - by Sir Whinesalot
Burning the Midnight Coffee
SubscribeSign in
I tried making a UI Library<br>Big mistake 🥹.
Sir Whinesalot<br>Jun 18, 2026
Share
My readers are probably wondering what I’ve been up to since my articles dried up for a rather long while. Life happened, mostly. Everything from the birth of a new child, to the other child catching pneumonia, to a suicidal cat jumping out the window and needing to be fed through a tube in her neck for a couple of months (she recovered!).<br>That was the main reason for the drought, but another reason is a project I’ve been working on: a UI library called SUIT (Stylish User Interface Toolkit).
One of SUIT’s demo apps running on the AppKit backend. Not depicted are all the animations. For example the tab bar supports scrolling and dragging and dropping. Sadly I’m not a designer so the styling could be better.<br>Think Electron, but in Reverse
Every project needs a raison d'etre , a reason why it exists. Sometimes that’s just to scratch an itch or learn something new, other times it’s an attempt at targeting an unmet market need. SUIT is the latter, I’m trying to target a similar market to Electron, but in reverse1:<br>Electron turns web apps into cross-platform native apps.<br>SUIT turns cross-platform native apps into web apps.
There are already various libraries that are used to develop native apps2 that can also target the web (Qt, Avalonia, etc.), but that’s not really what I mean. Those libraries produce native apps and those native apps can then run on the web, but the resulting “web app” is not really a “web-native” app, so to speak.<br>Just as Electron apps can feel somewhat out of place, Qt and Avalonia apps feel extremely out of place on the web, far worse than Electron apps do on the desktop. Qt and Avalonia custom render everything, so you don’t get the usual HTML and CSS behaviors one would normally expect from a web app. They’re also very large, and that size adds to the size of the exported web app. Small size still matters on the web, and neither Qt nor Avalonia are very good in this regard.<br>SUIT does not work like Qt or Avalonia, it is more like libUI or wxWidgets in that it wraps the native UI toolkits provided by the operating systems, plus HTML + CSS on the web. This introduces some very harsh design constraints, but so far nothing insurmountable.<br>What does SUIT do differently from libUI and wxWidgets then? It has to do with the “S” in the name (which stands for “Stylish”); SUIT neither uses nor mimics the native platform’s appearance. The core tenet of SUIT is:<br>Custom Look, Native Feel
Why not use the native look? Read on.<br>The Native UI Toolkit Disaster
There are no two ways about it, the native UI toolkits mostly suck. I’ve covered the absolute disaster that is Windows previously, so I won’t go into it in detail again, but the TL;DR is that Windows has an absolute graveyard of half-finished UI toolkits, and you simply cannot trust any Microsoft provided API not called Direct3D3. I’ll explain what I do regarding Windows later.<br>Apple-land fares better, but the cracks are starting to show. AppKit is very good, but even AppKit has quite a few limitations compared to some of the things you can do on the web. As an example, even something as trivial as a different radius per corner is something CoreAnimation does not support (you can mask some to 0, but that’s it). Same with a different border color per side. You can always do it yourself with multiple vector shape layers or by custom drawing with CoreGraphics, but that’s a lot of extra work.<br>Now there’s SwiftUI which Apple refuses to decide if it’s just a React-ish wrapper around AppKit, or 100% “the future” and AppKit is just an implementation detail for the time being. We might be looking at a Microsoft-like situation here eventually.<br>On Linux there are Qt and GTK, and both have issues.<br>Qt is quite good, but it’s been a bit of a mess since the introduction of QtQuick. Why they thought forcing people into QML instead of it being just a nice wrapper on top of a C++ API I have no idea, not to mention the amount of churn QtQuick has gone through. QtWidgets are still there and work very well but they’re clearly an afterthought these days.<br>GTK is actively developer hostile. They have backtracked on what must have been the stupidest thing I’ve ever read from the developer of a “platform API” (i.e., actively breaking backwards compatibility every 2 years, on purpose), but the fact that they wrote it at all is horrifying. They’ve also removed lots of widgets that could have been reimplemented as wrappers around their new APIs. No thought given to developers who just wanted an easier upgrade path from GTK 3 to 4.<br>Qt also breaks backwards compatibility between major versions, but it goes out of its way to make the transition as painless as possible.<br>The Native UI Style Disaster
SUIT’s calculator demo app, mimicking the style of the Windows 7 calculator.<br>On top of all of this, you...