DEV Community

Discussion on: Tailwindcss is beautiful 👌

Collapse
 
murashow profile image
Makar Murashov

Tailwind is great to build something fast and when you don't have a custom design, something like back-office or admin panel or just MVP version of your app. But my choice for now is styled-components or any other css-in-js libs.
Styled-components allows you to hold all your styles and logic separately (usually in a separate file), so you can pass props there (which is also has nice typings, thanks TypeScript for that) and SC decides what style to apply based on your prop. I had a chance to build a complex UI using tailwind-like styles, and I can't say that I liked it that much. You have to write a lot of conditions for tailwind classes to style an element, but with SC you could just pass a readable prop there (i.e. isSomething)

Collapse
 
prototowb profile image
Tobias Rauer

I don't understand you react guys. Css-in-js is the worst. People should just write proper BEM.