What if you could make any button bounce smoothly with just one simple class?
Why Bounce animation (attention) in Tailwind? - Purpose & Use Cases
Imagine you want to make a button on your website grab attention by bouncing up and down.
You try to move it manually by changing its position little by little in your code.
Manually changing positions frame by frame is slow and tricky.
You might forget some steps or make the movement look jumpy and unnatural.
It's hard to keep the bounce smooth and consistent across different devices.
Bounce animation in Tailwind uses built-in classes that handle smooth, natural bouncing automatically.
You just add a simple class and the button moves up and down to catch the eye without extra work.
button { position: relative; animation: bounce 1s infinite; }
@keyframes bounce { 0%, 100% { top: 0; } 50% { top: -20px; } }<button class="animate-bounce">Click me</button>
You can quickly add lively, attention-grabbing movement to elements with just one class.
On a signup page, a bouncing button can gently remind users where to click next.
Manual animation is slow and error-prone.
Tailwind's bounce animation is easy and smooth.
Just add a class to make elements bounce and attract attention.