Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Guide and example project for integrating Django with Tailwind CSS to create responsive, modern web applications.

A full-stack Next.js TypeScript template focused on functionality over UI, featuring Zustand, TanStack Query, and ESLint 9 support.
ts-django-tailwind is an open-source boilerplate that demonstrates how to integrate Tailwind CSS 3.4.14 with Django 5, providing developers with a working setup for building responsive, modern web applications.
ts-django-tailwind is an example project and guide for combining Django with Tailwind CSS. It pairs Django 5, the Python web framework, with Tailwind CSS version 3.4.14, the utility-first styling library, and adds Prettier for automatic formatting of utility classes on save. The repository holds the configuration and commands needed to run both a Tailwind watcher and Django's development server.
npm run watch:css responsible for compiling Tailwind styles in watch mode.npm install, npm run watch:css, then python manage.py runserver.The repository defines a simple two-process workflow. First, npm install pulls the npm dependencies listed in the project. Then npm run watch:css starts Tailwind's watcher, which compiles the Tailwind input into a CSS file and rebuilds it as templates change. In parallel, python manage.py runserver launches Django so templates render with the freshly generated styles. Prettier is activated in the editor to format class lists on save.
Yes. The front-end build uses npm, so Node.js and npm must be installed on your system before running the Tailwind watcher.
No. The project wires Tailwind directly using npm scripts and a Tailwind config file, rather than relying on the django-tailwind package's management commands.
The description states Django 5, so the project is aligned with that major version's APIs and improvements.
Install the Prettier extension in your code editor. When you save a file containing Tailwind classes, Prettier will reorder them according to its rules.
It runs Tailwind's watch mode, which monitors your template files and configuration. Any change triggers a rebuild of the CSS, so your compiled styles always match your latest edits.