Installation
Get started with tailwind-animations in just a few minutes. This guide will walk you through installing the package and configuring it in your Tailwind CSS v4 project.Tailwind CSS v4 Required: This package requires Tailwind CSS v4.0.0 or higher. For Tailwind CSS v3 support, see the legacy version section below.
Quick Installation
Import in Your Global CSS
Add the plugin import to your global CSS file (e.g.,
globals.css, main.css, or app.css):globals.css
Configuration for Tailwind CSS v4
Tailwind CSS v4 uses a new CSS-first configuration approach. Unlike v3, you don’t need to configure atailwind.config.js file. Instead, you simply import the plugin directly in your CSS file:
globals.css
Verify Installation
Test that the installation worked correctly by adding a simple animation to your page:Package Migration
If you’re migrating from the old package:-
Uninstall the old package:
-
Install the new package:
-
Update your CSS import:
Legacy Version (Tailwind CSS v3)
If you’re still using Tailwind CSS v3, you can use the last v3-compatible release:tailwind.config.js:
tailwind.config.js
We strongly recommend upgrading to Tailwind CSS v4 to take advantage of the latest features and improvements.
Troubleshooting
Animations Not Working
If animations aren’t showing up:- Check import order: Ensure
tailwind-animationsis imported aftertailwindcss - Verify Tailwind CSS version: Run
npm list tailwindcssto confirm you’re using v4.0.0 or higher - Clear your build cache: Delete your build output and rebuild your CSS
- Check for conflicting styles: Custom CSS might override animation properties
TypeScript Errors
If you’re seeing TypeScript errors with the import:Next Steps
Now that you have tailwind-animations installed, learn how to use it:Quick Start Guide
Create your first animation in minutes
Animation Catalog
Browse all available animations