Live data from Hacker News

DaisyUI: Tailwind CSS Components

daisyui.com

31–40 of 181 posts

Re: DaisyUI: Tailwind CSS Components

#32

Not entirely convinced about their graphs where they "improve" over tailwind with just HTML size and "number of class names". Why do these matter exactly? You're basically removing the number of classes in the HTML and adding the CSS anyways so how much are you really saving here? I don't mind the existence of this library obviously but condensing into tiny abbreviated classes seems like the antithesis of tailwind bu…

I imagine you're using most elements more than once in the HTML so the class names would be repeated X number of times.

Re: DaisyUI: Tailwind CSS Components

#33

Tailwind has the Bootstrap problem, in that I can tell straight away that a website uses Tailwind, and for some reason that is off putting.

Tailwind is just a different way of writing CSS.

UI libraries and websites all end up converging on a common set of ideas because of usability and readability, perhaps you're conflating Tailwind UI libraries with Tailwind itself. Tailwind doesn't inherently force a website to look a certain way any more than flexbox or CSS grids might.

I do agree in that if you're using Tailwind you're unlikely to be reaching deep into the full functionality of CSS for animation etc. but most websites aren't doing that whether they're using Tailwind or not.

Re: DaisyUI: Tailwind CSS Components

#34
I've been using daisyUI for a couple of years and really love it - it's a quick, reliable way to rig up a nice looking/functioning UI with minimal work, while making things appear reasonably uniform across pages/workflows.

The combination of Tailwind and daisyUI made it possible for me - a backend developer - to pretentd to be somewhat competent in frontendland, which has been incredibly handy, work-wise.

Re: DaisyUI: Tailwind CSS Components

#35

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.

I've been writing CSS manually since it came out. The latest additions make it less difficult, like & and nesting, variables, etc.

But overall, CSS is just really difficult to scale well properly. I should probably learn Tailwind at this point, instead of continually rolling my own CSS.

So now I have DaisyUI bookmarked since the site is excellent and looks so useful.

Re: DaisyUI: Tailwind CSS Components

#36
post #27

I'm surprised that a lot of the comments seem to be missing the reason that this project exists. In 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…

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

CSS classes already support this natively.

The whole point of CSS was move up a level of abstraction, so you could collect related styles into a class and reference that class everywhere you need that same grouping of styles instead of copy/pasting your HTML2 attribute-based styles all over the place.

But then we got Tailwind, which uses CSS classes to emulate the pre-CSS behavior of specifying styles at a hyperfine granularity everywhere.

And now we get DaisyUI, which emulates class based styling on top of a toolkit that emulates attribute based styling on top of the class based system of CSS.

After while we have to admit that this tech stack contortion is the result of picking a tool because of familiarity and not because it is the best fit for the problem.

Re: DaisyUI: Tailwind CSS Components

#37
post #26
post #10

This 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?

Tailwind is already a full circle. It is essentially a toolkit for using CSS to emulate the pre-CSS era approach of putting styling info inside attributes on the markup (remember the HTML2 days of bgcolor and cellpadding?).

Yeah it's turning the crank another half turn. It's insane to me how the webdev ecosystem keeps reinventing itself over and over and over again, trying to solve their previous mistakes without ever reflecting on and learning from why those issues existed in the first place.

Re: DaisyUI: Tailwind CSS Components

#38
The fact is that without using component-based HTML, Tailwind _is_ a mess and Daisy is probably useful. It's an amusing full-circle moment, where Daisy UI is a spiritual successor to Bootstrap, which did the same thing but with CSS as the underpinning.

Inside of a system that splits the HTML into components, Tailwind classes are not a problem...You just end up with instead of .

Re: DaisyUI: Tailwind CSS Components

#39

Tailwind has the Bootstrap problem, in that I can tell straight away that a website uses Tailwind, and for some reason that is off putting.

Bootstrap fights you when you move away from its built-in look-and-feel.

Tailwind is pretty close to neutral. You get the tailwind look by copy-pasting the tailwind components directly and straightforward use of the built-in palette and fonts. But it’s pretty easy to use customized palettes, not that bad to use different fonts (well, the hairy parts are due to HTML, browsers and the web, not tailwind), and it’s probably easier to skip the tailwind components if you know HTML (not a trivial skill but one well worth developing).

Re: DaisyUI: Tailwind CSS Components

#40
post #27

I'm surprised that a lot of the comments seem to be missing the reason that this project exists. In 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…

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

Isn't this called classes and Ids in CSS? Is Tailwind just CSS on top of CSS?

Post reply on HN