I don't really use Tailwind. I enjoy my (S)CSS. I took a look at https://daisyui.com/components/button/ and immediately I see classes that look similar to Bootstrap. So my question is: Why build components on top of something like Tailwind instead of just regular CSS? Or are you able to customize and use Tailwind mixed in with the components? Then sure why not I guess. Otherwise it feels like going full circle here.
DaisyUI: Tailwind CSS Components
21–30 of 181 posts
Re: DaisyUI: Tailwind CSS Components
#22It also has some unstyled or lightly-styled components (modal, dropdown, etc). These are just like using headless UI, but with less JavaScript. These also work well with the Tailwind utility classes to let you customize the actual display.
Re: DaisyUI: Tailwind CSS Components
#23At that point, why not just write CSS?
Re: DaisyUI: Tailwind CSS Components
#24I don't really use Tailwind. I enjoy my (S)CSS. I took a look at https://daisyui.com/components/button/ and immediately I see classes that look similar to Bootstrap. So my question is: Why build components on top of something like Tailwind instead of just regular CSS? Or are you able to customize and use Tailwind mixed in with the components? Then sure why not I guess. Otherwise it feels like going full circle here.
Re: DaisyUI: Tailwind CSS Components
#25Tailwind has the Bootstrap problem, in that I can tell straight away that a website uses Tailwind, and for some reason that is off putting.
Re: DaisyUI: Tailwind CSS Components
#26This is a rebuild of the antithesis of Tailwind on Tailwind. Bootstrap had this for decades (Daisy even copies the same semantic class names in some cases). Tailwind was supposed to break away from this, to specific actual styles directly, but looks like we're coming back full circle again. Why not just use Bootstrap?
Re: DaisyUI: Tailwind CSS Components
#27In many tailwind projects, you inevitably end up wanting to standardize how a button looks, how a field looks, etc., rather than copy+paste the same 20+ tailwind classes that you need to implement a nice looking button in tailwind.
Can you just apply it to `button { @apply flex items-center blahblahblah; }` in app.css? Of course you can. Or you can use the btn from DaisyUI.
I think DaisyUI is just a shortcut for many common UI components that you will inevitably want to build out and that you will necessarily eventually standardize in any app that grows large enough.
How does it differ from bootstrap? Well, you can continue to use tailwind for everything else that DaisyUI has not implemented. It's just an additive layer to tailwind. The project is at its core just a shortcut for common UI components.
As a user, my criticism is that many of the DaisyUI components seem to be lacking good contrast, so some just don't seem to be usable. The theming situation is really interesting and quite cool to use, but if you look at the example page, it just feels hard to read. I can't really find a light and dark default theme that look good to me (re: contrast and brightness). I think the color hooks might just not be there but I didn't dig far enough in.
For me, I've found a lot of value in being able to easily copy+paste parts of DaisyUI source code, e.g., a particular widget and modifying it to fit my design system, rather than use it in its entirety.
Re: DaisyUI: Tailwind CSS Components
#28Re: DaisyUI: Tailwind CSS Components
#29Re: DaisyUI: Tailwind CSS Components
#30I don't mind the existence of this library obviously but condensing into tiny abbreviated classes seems like the antithesis of tailwind but maybe it's for folks who can't or don't want to define a base button component every time and want a jumping off point. In that case I'd much rather use shadcn or something based on react-aria that gives me solid primitives that I can extend with tailwind classes passed to it in specific instances