Installation and usage
This plugin works alongside TailwindCSS, which is a prerrequisite for the
plugin to work, so make sure you have it installed and set up in your
framework of choice before using the animations displayed below.
Install the package
With npm:
npm install amazing-tailwind-animations
Add the plugin to your tailwind.config.mjs
file
import amazingAnimations from 'amazingAnimations'
export default {
// rest of your config
plugins: [amazingAnimations]
}
Use the animations
Once you have the plugin installed and added to your tailwind config file, you
can use the animations by adding the classes to your HTML elements.
The classes are named after the animation they apply, and they are prefixed
with animate-
to
make them easier to identify.
You can also use the hover:
and focus:
prefixes
to apply the animations on hover and focus states.
Here are some examples of how to use the animations in your HTML:
<div
class="animate-bounce"> <!-- Your content here --> </div>
<button class="hover:animate-pulse"> <!-- Your content here --> </button>
<input type="text" class="focus:animate-wobble">
Customize your animations!
You can adjust your animations duration, fill mode, delay, steps, iteration
count, range, and much more!
Click here to see how you can do it.