A Question about Tailwind plugins in Fresh
Hi there! I recently found this plugin for Tailwind: https://github.com/jamiebuilds/tailwindcss-animate, which is supposed to help to define even more properties on the tailwind animations. For example if I have understood everything correctly. However I have really struggled to import it. How would one go about importing this into a fresh fresh.js project. I'm using Fresh.1.5.2, Thanks in advance;)
9 Replies
Tailwindcss plugins need to be configured in tailwind's configuration file. Have you done that as outlined in the readme file of that project?
Thanks for the quick respond. My config file looks like this:
I haven't installed it through npm.
that looks fine
what happens when you change the
https://esm.sh/tailwindcss-animate@1.0.7
import to this: https://esm.sh/tailwindcss-animate@1.0.7?external=tailwindcss
Ok that looks better, is there a.
tailwindcss/plugin
alias set up in your import map? It should've been set up by default by Fresh. If not you can add it (make sure to match tailwind versions)
I think it all works now, thanks a ton!:P
@marvinh. Im actually not sure that it works as intended. There is no errors in the console but i don't think the plugin works. You said that I need to match the versions, am I using tailwind 0.16.19? Do you think i need to upgrade it in order to use the plugin? Bellow is my imports:
No, you're not using tailwind at all. You're using
twind
You might want to switch from twind to tailwindcss https://fresh.deno.dev/docs/examples/migrating-to-tailwind
Migrating to Tailwind | Fresh docs
Migrating from twind to Tailwind CSS
Haha, ohhh my! Im dufos!:P
Thanks for the clarification!:P