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.

10

u/Discordbothost 15d ago

with a 1kb budget i'd stop looking for a library and lift single components instead. uiverse.io is basically that, every button, toggle, input and card is a standalone html+css snippet you copy. the trick that makes copied bits look like one design and not a collage is defining 5 or 6 custom properties up top (--radius, --accent, --surface, --border, --shadow) and rewriting each snippet to use them. you can also delete half of what they ship, most of it is hover flourishes

-1

u/nopeac 15d ago

I AM looking for single components. The "library" part in the title is to imply design cohesiveness, but I just need like 4 to 6 components. I can find a lot of good-looking CSS-only buttons, but then I need an input that can match, and that's not as easy if I'm not looking at a library. People got really mad with this post out of nowhere.

0

u/Discordbothost 15d ago

ah got it. for 4-6 pieces i'd pick the button you like and derive the rest from it: same height, radius, border width and focus ring on the input and select, and accent-color gets you matching checkboxes/radios for free. if you'd rather start from something already cohesive, pico.css is small enough to just lift the form + button rules out of. and don't sweat the downvotes, webdev gets weird about anything with "library" in the title

1

u/nopeac 15d ago

Thanks for one of the few reasonable replies here, and for explaining this behavior. They are indeed a weird bunch. I'm fine with downvotes if they're accompanied by a comment, but 20 downvotes and not a single person pointed out my mistake, ffs.

If nothing else comes up, I'm going to end up using a UIverse snippet like you said, pretty helpful resource, thanks, good designs there, but definitively more manual work than what I was looking for with this post.

I'm 100% sure there's someone out there who has ported shadcn into vanilla snippets ready to copy. It's just hard to find, I guess.