Skip to main content

Tailwind CSS integration for Django a.k.a. Django + Tailwind = 💚

Tests PyPI GitHub Python versions Downloads Downloads / Month

Django Tailwind Demo

Goal

This project provides a convenient way to integrate the Tailwind CSS framework into a Django project. It creates a new Django app (named theme by default) that includes all the necessary files and configurations to get started with Tailwind CSS quickly and without even needing to install Node.js if you choose the standalone binary mode.

Features

  • An opinionated Tailwind CSS setup that makes your life easier;
  • Two installation modes: standalone binary (works without Node.js) or npm-based (Node.js required);
  • Hot reloading of CSS, configuration files, and Django templates. No more manual page refreshes!
  • Out of the box support for CSS imports and nesting;
  • Supports the latest Tailwind CSS v4.x;
  • Start both Tailwind CSS and Django development servers with a single command;
  • An optional DaisyUI integration to spice up your Tailwind templates with pre-built components.
  • A convenient management command for installing Tailwind CSS plugins;

Requirements

Python 3.11 or newer and Django 5.2 or newer.

Note: Node.js 22 or newer is only required if you choose the npm-based installation. The standalone binary mode does not require Node.js.

Documentation

The full documentation is at https://django-tailwind.readthedocs.io/ or in the docs directory of this repository.

Install with an AI agent

Using a coding agent such as Claude Code, Codex, or Cursor? Point it at llms.txt and let it do the setup:

Install and configure django-tailwind in this project by following
https://raw.githubusercontent.com/timonweb/django-tailwind/master/llms.txt

The agent will ask you a few questions (standalone or npm-based, app name, daisyUI) and then install, configure, and verify everything.

Getting Started

  1. Install django-tailwind:

    a) With all dependencies that make development easier (recommended):

    pip install 'django-tailwind[cookiecutter,honcho,reload]'
    

    b) or just the core package (enough for production use; tailwind init additionally needs the cookiecutter extra):

    pip install django-tailwind
    
  2. Add to INSTALLED_APPS in settings.py:

    INSTALLED_APPS = [
        # ...
        "tailwind",
    ]
    
  3. Create Tailwind app:

    python manage.py tailwind init
    
  4. Add the generated app to INSTALLED_APPS and configure:

    INSTALLED_APPS = [
        # ...
        "tailwind",
        "theme",  # your generated app name
    ]
    
    TAILWIND_APP_NAME = "theme"
    
  5. Install Tailwind CSS dependencies:

    python manage.py tailwind install
    
  6. Start development (runs Django + Tailwind):

    python manage.py tailwind dev
    
  7. Use Tailwind classes in your templates:

    {% load tailwind_tags %}
    {% tailwind_css %}
    
    <h1 class="text-4xl font-bold text-blue-600">Hello Tailwind!</h1>
    

That's it! 🎉 Your Django project now has Tailwind CSS installed and ready to use.

For configuring automatic page reloads during development, see the Installation instructions.

Bugs and suggestions

Please see CONTRIBUTING.

2019 - 2026 (c) Tim Kamanin — A Full-Stack Django and Wagtail Developer

Star History

Star History Chart

Metadata

Release files for django-tailwind 4.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-tailwind 4.6.0
File Size Uploaded
django_tailwind-4.6.0.tar.gz 15.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-tailwind 4.6.0
File Interpreter ABI Platform
django_tailwind-4.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.1 kB

Release files / django_tailwind-4.6.0.tar.gz

Download URL django_tailwind-4.6.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a8ff8ddf576d840c1af9e3c59a62297b17e897b2665bfc14c4f69e85d1e18527
BLAKE2b-256 checksum
How to use checksums
ff434fbef32ce3430b9e87bfe2bc31941b4c536c645b91fb78fdd393ab4d57cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / django_tailwind-4.6.0-py3-none-any.whl

Download URL django_tailwind-4.6.0-py3-none-any.whl
Size 25.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b865bac746158dd103ffc3b7855f54f8d75a3147eb59867d8ed0c145fd5f7a34
BLAKE2b-256 checksum
How to use checksums
f73cb2a07d31d0374f08d2ac706a89a2a9d0ae18e9c476a20cfc2c5d36b66faa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.6.0 This release

2 release files

4.5.0

2 release files

4.4.2

2 release files

4.4.1

2 release files

4.4.0

2 release files

4.3.1

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.9.1

2 release files

3.9.0

2 release files

3.8.0

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.3.0

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

1 release file

0.6.0

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page