r/webdev • • 19d 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

8

u/Both-Tart7460 19d ago

when I built a zero-build client tool last month.

Here are 3 options that actually work with ZERO npm / build step:

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

1

u/bohdan2 16d ago

These are the classics.