Hacker News new | ask | show | jobs
by lawn 328 days ago
I really don't understand why you use Tailwind for a CSS component library.

To use your component library now people have to use Tailwind, while if you'd used regular CSS both sites with and without Tailwind could use the library (Tailwind is additive on top of CSS after all).

Maybe it appeals to people in the Tailwind bubble, and gain momentum that way?

3 comments

I'm using Tailwind mainly because it came installed by default with create-react-router-app, and it seemed easier to just go with the flow (this is my first web project in about 10 years, so I'm re-learning everything), rather than trying to come up with my own bespoke thing.

After learning it a bit, I liked Tailwind. Writing CSS manually sucks. It's fiddly, and often you have to sit around adding and changing random things until it looks the way you want, and you have no idea why what you did worked. Tailwind doesn't completely fix that, but it makes it significantly better.

But I don't feel like building my own components from scratch. That's where DaisyUI comes in to make my day easier. But if I want to override any of DaisyUI's choices, I have Tailwind's easier-to-use classes that I can use to easily do so.

I have used DaisyUI as a base class and then extend on it with additional tailwind classes. Sensible defaults.
I mean, that's certainly a valid set of users to target: people already using Tailwind that want some off-the-shelf components.