DEV DIARIES

What is better? A CSS framework like TailwindCSS, or a component library like MUI

by syntax_error

Fri Feb 03 2023 20:52:48 GMT+0000 (Coordinated Universal Time)

Maybe it depends on your coding style. Maybe it depends on the application. My thoughts are that if you are going to use a library or tool to help in your front-end development, it should be a component library. While TailwindCSS was helpful in creating this application, I believe it made my markup more cluttered than it needed to be. Additionally, I have created my own boilerplate CSS code for utilities like margins, padding, flexbox, etc. I don't believe a few lines of utility CSS classes would create any more bulk than the lines of code created by using multitudes of Tailwind classes. Nor that the time spent copying/pasting pre-written utility classes is any more time-consuming than writing Tailwind classes into elements. Component libraries, on the other hand, seem like a tool that saves time in development while still allowing for lots of functionality and customization. While I haven't had much experience yet with these tools, maybe I can revisit this once I have.

0 Comments