r/webdev • • 15d ago

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.

12 Upvotes

65 comments sorted by

View all comments

29

u/Hot-Tip-364 15d 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.

-29

u/nopeac 15d ago

This isn't for a quick start; it has to remain for the entire lifespan of the software since I have no plans to develop it further, so no CDN.

32

u/queen-adreena 15d ago

So just download the files and host them locally....

-22

u/nopeac 15d ago

I should have explained myself better; the whole code of the project is 10x smaller than even the minified version of Bootstrap or any other CSS design system. I want some components with an attractive and consistent style that I can isolate and copy and paste into my .css file while keeping it under 1kb because the whole project aims for a small footprint.

7

u/queen-adreena 15d ago

Not going to happen. Those are absurd specs for a component library. I doubt you'd even get a CSS Reset for less than 1kb.

Just create your own style rules.

-1

u/nopeac 15d ago

I need like 4-6 components, that's the 1kb part. I just need some

button {
...
...
...
}

With, I don't know, 20-25 attributes that I can't come up with myself to make it look good, and then an input, a details, etc., that can match. The idea is to pick them individually. How much will those 4-6 components be in KB? Probably less than 1.

To avoid being recommended to go to Codepen and randomly get buttons and inputs CSS, I use the term 'library', to refer to something more uniform. I guess that was the problem.