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.
18
8
u/Both-Tart7460 4d ago
when I built a zero-build client tool last month.
Here are 3 options that actually work with ZERO npm / build step:
Pico CSS (picocss.com)
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 5d ago
3
u/corvox1994 5d ago
Is it in active development though? The lead dev is known to go AWOL for long periods frequently.
2
u/Past_Brain1826 4d ago
Last update was 2 months ago, so while it may not be super active, it’s certainly not dead.
5
u/lekoalabe 5d 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 5d ago
polished" and "no build step" don't usually fit in the same sentence. pick one.
4
u/lKrauzer 4d ago
Classless CSS: https://github.com/dbohdan/classless-css
Pico CSS: https://github.com/picocss/pico
2
1
u/private_birb 5d 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.
-17
u/nopeac 5d ago
Just checked Pure.css
.button-secondary { color: white; border-radius: 4px; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); }I... I could have achieved something similar myself in a blink. I mentioned I wasn't going with shadcn, but I should have clarified that I was looking for that kind of polished, (<) medium-effort result.
0
u/nopeac 4d ago
People just downvote instead of telling me what I've done wrong. Oh well... "community."
5
u/xkey 4d ago
You're looking for something super specific but also super minimal that lives up to some design standard of which we have no idea. You're shutting down every suggestion. Just do it yourself brother.
0
u/nopeac 4d ago
Snippets of CSS of a button, an input, and a details tag that look similar to each other are a super specific request? Wow.
Look what you can do with 40 loc: https://uiverse.io/chintu_2484/fat-moose-56
Yet I'm being asked to be satisfied with a library where a button has a border radius and a text shadow.
2
u/lucaslamou 4d 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 5d 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
1
1
1
u/sunesimonsen 4d ago
Not 100% ready for primetime, but I’m looking for feedback on the direction https://microbe.sune.one
1
u/Standard_Scarcity_74 4d 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
-4
u/CarloDaBoss 5d 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
29
u/Hot-Tip-364 5d 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.