I am currently thinking about how to style websites now that we are looking into building a member console web app for Wiki Cafe.
Component libraries
The thing about component libraries is, there seems to be no obvious choice among the too many options out there. People out there say that styling things yourself and creating your own components is a pain that is not worth it. I sometimes feel skeptical about this, specially when the claim is being made by a website with a “pricing” link top and center, or when it is a clickbait factory tech influencer acting like the choice is a matter of life and death. On the other hand, I can’t ignore things like WAI-ARIA; I also have better things to do than to become a CSS expert; Finally, I’ve been at the beginning of the Dunning-Kruger curve way too many times to recognize the smell of my own overconfidence.
No, we can’t build our own component library, Wiki Cafe benefits more if we stay focused. Hoping for the day when we can have our own component library, but that seems to be a ways away.
If we aren’t going to build a component library ourselves, then the question becomes… what will we use?
I am planning to build the member console with HTMX and Go, and so I’d like to use a library that fits with these two. What this means is, we want a component library that doesn’t couple itself with any specific tooling, that is, it is agnostic.
We don’t want something highly opinionated. We want something that we can have a reasonable amount of flexibility with. That is, the defaults should be good, but we should be able to modify aspects of components without much hassle.
It obviously should also prioritize accessibility.
We also want minimal JavaScript. The less JavaScript, the better. This may be a bit extreme, but I’d prefer if we didn’t need to get an external CDN involved to get less than a megabyte of JavaScript loaded into people’s browsers.
Finally, to keep my sanity, I’d love to keep things as vanilla as possible. I don’t want to deal with leaky abstractions or build steps. The components should be self-contained to a degree. I want the HTML templates and strings written on the server to look like the final HTML shown on the browser. No classes, no decorators, no magic, no smarts. Ideally, I’d be able to just copy and paste the component code and then reuse it by pasting it, but that may be a fantasy.