DEV Community

Ishan Tiwari
Ishan Tiwari

Posted on

Should you use a css library

There are plenty of css libraries available out there like bootstrap, materialize, tailwind css, Material UI and a lot of them.

But there is the big question should these libraries ever be used?

The pros of using a css library

The biggest pro of using a css library is consistency. That is if you stick with one library for example bootstrap and learn it by heart then all of the websites you build will have the same layout and will follow a nice track

Speed is another pro using a css library. If you use a css library you just have to write classes in your elements and then see them spinning to life. It saves you a lot of hardwork.

Cons

The biggest con for a css library is that you never ever have to touch css for some of those. So if you are a newbie in the world of Web Development then you'll never ever touch css and never learn it.

The second con is a thing called flexibility. If you write all the css code inside your app then you leave your mark in every app you create, but if you use something like bootstrap it is their wish of how your application should behave. Like the navbar, the header, the footer, the headings and everything if you want to gain the control and work speedily as well you will have to learn what styles its component uses. So, that you don't encounter tricky bugs as a result of the conflict of their css and your css.

Final Thoughts

Provided the last two cons you should only use a css library when.

  1. It is a project which you want to create fast.
  2. You are a css master and or the master of the library.

The other question well is. Is it profitable getting into learning the css library?
Yes, it is they will give your projects speed and good looks.

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (1)

Collapse
 
calinzbaenen profile image
Calin Baenen

Spark is a library that eliminates both cons, and I believe it's (relatively) beginner friendly.

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay