Django + Tailwind CSS = ❤️

May 14, 2019 · Updated: Jan 04, 2021 · by Tim Kamanin

If you use Tailwind CSS and want to integrate it easily with Django, check out a package I created about a month ago.

Surprisingly it's called Django-Tailwind. You can find it here on GitHub:

If you don't know what Tailwind CSS is, then my friend, I'm probably going to save your frontend life now.

Tailwind is a utility-first CSS framework for rapidly building custom designs. It gives you all the building blocks you need to build designs without any annoying opinionated styles you have to fight to override (which happens quite often while working with CSS frameworks like Bootstrap, Foundation or Bulma).

Tailwinds approach to CSS is very different from methods we've all been employing over the years. To read more about the rationale behind functional CSS and Tailwind, check this blog post written by an author of the framework: CSS Utility Classes and "Separation of Concerns".

I've been working with CSS for twelve years now. And discovering Tailwind and taking the functional approach to CSS has been tremendously enlightening and refreshing to me. I hope you'll like it too.

One can easily use Tailwind CSS with any Django project. You need to install Django-Tailwind CSS from PyPI and follow the instructions outlined in README.

UPDATE: You can now use Tailwind v2 with Django; check this announcement post.

Hey, if you've found this useful, please share the post to help other folks find it:

There's even more:

Subscribe for updates

  • via Twitter: @timonweb
  • old school RSS:
  • or evergreen email ↓ ↓ ↓