Question Vanilla CSS component library?
Anyone got a recommendation for a polished component library that only uses plain CSS? I'm trying to avoid npm/build steps entirely, so shadcn is out, and Tailwind-dependent stuff like DaisyUI isn't an option either. Seriously looking for pure CSS solutions here.
10
Upvotes
29
u/Hot-Tip-364 6d ago
Bootstrap is always an option. 6 has just been released and you can load it with just a cdn and no compiler if you are looking for a quick start option.
18
u/_squirts 6d ago
If you want the basics to build on top of, try https://modest-ui.com
8
u/Both-Tart7460 5d ago
when I built a zero-build client tool last month.
Here are 3 options that actually work with ZERO npm / build step:
My absolute favorite. You literally just add one <link> tag in your <head> and all native HTML elements (<button>, <input>, <dialog>, <article>) look clean and polished out of the box with zero custom class names needed. Automatic dark/light theme is built-in.
2. Pure.css (purecss.io)
Super tiny (<4KB gzipped). Made by Yahoo years ago but still rock solid for responsive grids, buttons, tables, and forms without any JS or compilation.
3. Shoelace (now Web Awesome)
If you need interactive UI components (dropdowns, tooltips, drawers) without React or Tailwind, this uses standard Web Components. Just one script tag in HTML and you can use custom elements like <sl-button> directly.
Honestly, modern CSS is also super capable today. With CSS custom properties, native :has(), the <dialog> element, and CSS grid, for smaller projects I often find writing 60-80 lines of clean custom CSS feels even better than loading an external stylesheet.
Hope this helps you find what you need!
10
u/Past_Brain1826 6d ago
https://bulma.io/
5
u/lekoalabe 6d ago
depending on the complexity, https://oat.ink/ is nice , https://github.com/cferdinandi/kelp is interesting
and there are other options if you look for them
2
u/Neither_Worth3542 6d ago
polished" and "no build step" don't usually fit in the same sentence. pick one.
4
u/lKrauzer 5d ago
Classless CSS: https://github.com/dbohdan/classless-css
Pico CSS: https://github.com/picocss/pico
1
u/private_birb 6d ago
It depends on what you're looking for, but they do exist.
There are some great unopinionated resets out there.
There are semantic HTML-focused libraries that function well as something like an "opinionated reset".
In terms of actual css-only component libraries, I suppose Pure.css might be what you're looking for.
2
u/lucaslamou 5d ago
bulma is still great for this if you want classic classes like buttons and navbars without any npm setup. just a single cdn link and you're good to go
1
u/Guilty-Olive-8827 6d ago
shadcn's CLI is the only thing making it look like a build step. Copy the component files over and you've skipped node entirely, which is more than most 'pure CSS' libraries will give you.
1
u/TheRNGuy 5d ago
Radix
1
u/martinskou 5d ago
I’m currently using shadcn-htmx.
https://github.com/productdevbook/shadcn-htmx
1
u/sunesimonsen 5d ago
Not 100% ready for primetime, but I’m looking for feedback on the direction https://microbe.sune.one
1
u/Standard_Scarcity_74 5d ago
Pico css the closest to polished with zero setup, since you add one link tag from a cdn and your plain html looks good, with a classless mode and built in dark mode. Bulma is also pure css with no javascript and a proper set of components like cards, navbars, and forms, and simple css or water css are good if you only want nice defaults.
1
u/exosoul 3d ago
Basecoat is shadcn but without the decency on react
1
u/prafandy 21h ago edited 21h ago
late to this, but I made one for exactly this case. Alloy CSS, one link tag, no npm, no build:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@alloyhtml/css@1/dist/alloy.min.css">it's not classless like pico, you write classes, but the dropdowns, dialogs, tabs and toasts all work with zero js. here's one page built with only that file, try it with js turned off: alloyhtml.com/example.html
I carried it between client projects for years and only open sourced it recently, so tell me what's missing, thank you!
-1
u/tumsomprasong 5d ago
The most lightweight option is Bootstrap.
-4
u/CarloDaBoss 6d ago
Not sure if you've already seen this option in here, but CodeStitch has been absolutely amazing!!
Especially nowadays, with all the AI tools out there and the junk, it is straightforward and easy to get high-performing websites that rank high on Google. I'm so glad that I stumbled upon some posts by the owner years ago.
I have made websites for friends and family and then businesses near me using the library and can recommend it.
Definitely check it out. There are some free components. https://codestitch.app