timonweb / django-tailwind

Django + Tailwind CSS = 💚
https://django-tailwind.readthedocs.io
MIT License
1.45k stars 89 forks source link

How to use TailwindCSS plugins (like DaisyUI)? #137

Closed ddahan closed 2 years ago

ddahan commented 2 years ago

Hello.

I browse the documentation and didn't find anything about plugins. I'd like to use daisy UI which usually need npm to be installed before configuring the tailwind.config.js file.

I'd like to use official Tailwind plugins likes Typography as well.

Is there a way to do that with django-tailwind?

Thanks.

Alexandre-petitjean commented 2 years ago
  1. Move to the location of node_modules. For me ./theme/static_src/
  2. Install the package with npm i daisyui
  3. Add the plugin in tailwind.config.js

This should work with other tailwind plugin as well.

abrichr commented 1 year ago

For future reference, you may need to empty your cache for the styles to become visible.

Related: https://github.com/timonweb/django-tailwind/issues/147, https://github.com/timonweb/django-tailwind/issues/108