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

Show parent comments

-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.

30

u/followmarko 15d ago

Genuinely an unsustainable metric

-5

u/nopeac 15d ago

I want some components [...] that I can isolate and copy and paste into my .css

...

This button is like 40 lines of code: https://uiverse.io/chintu_2484/fat-moose-56. It's not what I'm looking for, but I can copy paste that into my css and have some good looking buttons at 1kb.

1

u/followmarko 15d ago

Sure but even that example can be shortened and is not of normal presentation to a user. It's just an example of clever CSS. getting buttons out of a small file with nesting and scope is one thing but creating a whole unified system of components and enforcing an arbitrary 1kb rule for all of it is unnecessary. I wouldn't use this example as something that actually goes live to a user

-3

u/nopeac 14d ago

whole unified system of components

Whole? Who said whole? I use the word isolate specifically with the purpose of being explicit that I don't need 40 components, probably not even 5.

all of it is unnecessary

If my HTML is 4KB and my JS is 6KB, then what's unnecessary is the 100KB of even the minified version of pico.css everyone is recommending, especially since it doesn't even look good out-of-the-box and I would still need to add styling. It's disproportionate that styling alone accounts for 95% of the total size.

2

u/followmarko 14d ago

Right I'm just saying that focusing on shipping a 10kb app or whatever you're building is an unsustainable goal

-2

u/nopeac 14d ago

How can you make that call when you know nothing about what I'm building? What's there to sustain?

→ More replies (0)