Shake Animation
A shake animation for alerts or notifications
Demo
MAX
Acquire the MAX Plan
Unlock unlimited potential with our most advanced features and priority support.
Shake Animation
This is a simple shake animation that can be used for alerts or notifications.
Installation
Copy and paste the following code into your project.
Agrega la clase animate-shake
al elemento que quieras animar.
@layer utilities {
.animate-shake {
animation: shake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes shake {
0%, 100% {
transform: translateX(0);
}
10%, 30%, 50%, 70%, 90% {
transform: translateX(-5px);
}
20%, 40%, 60%, 80% {
transform: translateX(5px);
}
}
}
Use the class animate-shake
to apply the animation to an element.