Framework Showdown: Tailwind vs Bootstrap
Tags: webdev, css, programming, html
Published: 2021-04-13 05:06:09

<div class="modal-body">
<figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*0zQWlDYb04cxMT6Y"><figcaption>Source: <a href="https://themesberg.com/blog/design/tailwind-css-vs-bootstrap">Zoltan Szogyenyi</a></figcaption></figure><p>Exploring a new css framework is like Christmas for anyone who loves to tinker with user interfaces. Recently, I came across an <a href="https://dev.to/easaaa/why-start-using-tailwindcss-in-2021-e5n">awesome blog post from Leonardo</a> that tries to make an argument that you should start using Tailwind instead of &lt;insert your css framework of choice here&gt;. For me, I’ve always found <a href="https://getbootstrap.com/">Twitter’s bootstrap</a> framework to have the most compelling set of features. But if I’m really going to make the switch, the argument needs to be more compelling. Here’s a compare and contrast of the two frameworks.</p>
<h3><strong>Compare and&nbsp;Contrast</strong></h3>
<p>Both frameworks are utilities that help you define dynamic and reactive websites. Bootstrap has been around for 10 years and is the larger, more popular framework. Tailwind CSS is still growing in this area and has recently gotten a community of developers who are talking about its abilities. The main difference between the two frameworks is that Bootstrap ships with a large set of <a href="https://getbootstrap.com/docs/5.0/getting-started/introduction/">components</a>. Personally, I think that there is no reason why Tailwind could have a similar set of basic components to help people make websites.</p>
<h3><strong>Documentation</strong></h3>
<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*8XViSyP9bez6-Lh68U4TXA.png"><figcaption>Source: <a href="https://mdbootstrap.com/docs/standard/">MB Bootstrap</a></figcaption></figure><p>Adoption rates for any platform or framework depend heavily on how much documentation is available. In both cases here, the documentation is really good. Tailwind even has a dedicated <a href="https://www.youtube.com/channel/UCOe-8z68tgw9ioqVvYM4ddQ/videos?view=0&amp;sort=p">YouTube channel</a> where they walk through new features and tutorials. Where Tailwind struggles is that they don’t have the vast library of examples <a href="https://getbootstrap.com/docs/5.0/examples/">like Bootstrap does</a>.</p>
<h3><strong>Speed</strong></h3>
<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WkMTDvWqmXf6TUhh"><figcaption>Source: <a href="https://unsplash.com/@marcojodoin?utm_source=medium&amp;utm_medium=referral">Marc-Olivier Jodoin</a></figcaption></figure><p>Tailwind has a JIT compiler that allows you to really optimize file size and speed at which the page is rendered. A big drawback of Bootstrap is that even if you aren’t going to be using modals and accordions to make your website, you still have to load all of the required files. Even after minifying all of the requirements, Bootstrap is around 308.25kb. Compared to Tailwinds 27kb, Tailwind is going to be able to render way&nbsp;faster.</p>
<h3><strong>Conclusion</strong></h3>
<p>I think that if you are tackling a small project and are okay with the idea of creating a lot of the components yourself, you should be open to trying out Tailwind. Just messing around with it so far, it does save you from having to write a bunch of css code. The benefit isn’t the code however, the benefit is the JIT compilation and small file sizes. Bootstrap is way over bloated and can’t easily be paired down so it’s unlikely to change at this point. It might come down to preference, but knowing that options like this exist are&nbsp;fun!</p>
<p><strong>Thank you for reading this far. If you enjoyed this post, please share, comment, and press that ♥️&nbsp;!</strong></p>
<p><strong>Follow me on </strong><a href="https://twitter.com/maurerpwer"><strong>Twitter</strong></a><strong> and Dev if you’re interested in more in-depth and informative write-ups like these in the&nbsp;future!</strong></p>
<img src="https://medium.com/_/stat?event=post.clientViewed&amp;referrerSource=full_rss&amp;postId=4adb740df21" width="1" height="1" alt="">
</div>