Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add compatibility with tailwindcss v4 #63

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zbigniewstefaniuk
Copy link

@zbigniewstefaniuk zbigniewstefaniuk commented Nov 27, 2024

Hi there, huuge fan of tailwindcss-animate here

I've updated peer dependencies to play nicley with tailwind v4

@jamiebuilds

@kimonneuhoff
Copy link

@jamiebuilds can you please merge this pr? :)

@ktisakib
Copy link

please merge the pr we want to use v4 with this

@M-51
Copy link

M-51 commented Dec 23, 2024

In the meantime, you can override tailwindcss-animate peer dependency, by adding this:

 "overrides": {
    "tailwindcss-animate": {
      "tailwindcss": "$tailwindcss"
    }
  },

to your package.json.

tailwindcss-animate will use tailwindcss version specified in your package.json file.

@matthewgapp
Copy link

For those looking for a plug-n-play solution: I published a fork as a short-term workaround where I'm folding in some of the outstanding PRs, since this repo hasn't had activity in 2 years. https://github.com/nobie-org/tailwindcss-animate.

npm: https://www.npmjs.com/package/@nobie-org/tailwindcss-animate

@Wombosvideo
Copy link

I've translated this plugin to the new CSS-first format and uploaded the code to https://github.com/Wombosvideo/tailwindcss-animate-v4. Maybe this helps someone

@adielhercules
Copy link

I was having the same issue and found a workaround, I found this is working properly:

In your app.css, you can add the plugin like this:

@import "tailwindcss";
@plugin "tailwindcss-animate";
/* ... rest of theme and styles */

This is described in their documentation:

Use the @plugin directive to load a legacy JavaScript-based plugin

Link: https://tailwindcss.com/docs/functions-and-directives#plugin-directive

@Wombosvideo
Copy link

@adielhercules Sure but you will still get some glitches

@markosmk
Copy link

markosmk commented Feb 1, 2025

I've translated this plugin to the new CSS-first format and uploaded the code to https://github.com/Wombosvideo/tailwindcss-animate-v4. Maybe this helps someone

This is the best response, and better adapted to the V4 of Tailwindcss, thanks

@altanbgn
Copy link

altanbgn commented Feb 4, 2025

still not merged? It this project abandoned?

@WilsonNet
Copy link

@adielhercules Sure but you will still get some glitches

thank you so much, it worked, it is much prettier as a css file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.