Skip to content
On this page

Getting Started

In a project where you're using Tailwind CSS v3, run this to install this package:

npm add -D animated-tailwindcss

Then configure your tailwind.config.js to use the animations:

const { withAnimations } = require('animated-tailwindcss')

module.exports = withAnimations({
  // your (existing) Tailwind CSS config here
const { withAnimations } = require('animated-tailwindcss')

module.exports = withAnimations({
  content: ['./src/**/*.{html,js}'],
  theme: { extend: {} },
  plugins: [],

After proper config, you can use the animations of Animate.css the same way as you use those of Tailwind CSS:

<h1 class="animate-bounce animate-infinite">Bouncing Heading</h1>


  • If you're coming from classical Animate.css, please note that you need to reference the classes using hyphen instead of underscores (e.g., animate-bounce instead of animate__bounce).

  • The built-in animations (spin, ping, pulse, bounce) are prefixed by tw. So, if you want Tailwind CSS' bounce you need to write animate-twBounce instead of animate-bounce.

  • The animations this package provides are not exactly same as that of Animate.css. We have done some modifications to provide you with more consistent and customizable animations.

With Play CDN

It is as simple as this:

<!DOCTYPE html>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <script src=""></script>
    <script type="module">
      import { withAnimations } from ''
      tailwind.config = withAnimations()
    <div class="flex h-screen items-center justify-center">
      <div class="animate-tada text-2xl animate-slow animate-infinite">Hi!</div>


The Play CDN is not suitable for production builds, and the above example will not work if your browser does not support ES6 modules (Can I use? ).

Released under the MIT License.