1.1.0 • Published 7 months ago

tailwindcss-animate-plugin v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Tailwindcss plugin for animate.css

An elegant animate.css plugin for tailwindcss.

Install

npm i tailwindcss-animate-plugin

Usage(3 steps)

  1. Add plugin in tailwind.config.ts
import animatePlugin from "tailwindcss-animate-plugin";
import type { Config } from "tailwindcss";

const config: Config = {
  content: [
    "./pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
  ],
  plugins: [animatePlugin()],
};

export default config;
  1. Copy class in animate.css, replace __ with --.

For example: animate__bounce, change animate__bounce to animate--bounce.

  1. Add below content to your global css file:
:root {
  --animate-duration: 1s;
  --animate-delay: 1s;
  --animate-repeat: 1;
}

@media print, (prefers-reduced-motion: reduce) {
  .animate--animated {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .animate--animated[class*="Out"] {
    opacity: 0;
  }
}
1.1.0

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago