Browse documentation

Reference / Transitions & animation

Emphasis animations

Shake translates horizontally, wiggle rotates, and float moves vertically. These presets draw attention to an element already in position.

Working example

Float repeats by default. Add an explicit iteration count to use it as a one-time prompt.

HTML
<details class="group rounded border p-4">
  <summary class="cursor-pointer font-semibold">Locate the selected mark</summary>
  <p class="mt-3 origin-left motion-safe:group-open:animate-wiggle">◆ Registration mark</p>
</details>

Class reference

ClassCSS declarations
animate-shakeanimation: mono-shake 450ms ease-in-out both;
animate-wiggleanimation: mono-wiggle 700ms ease-in-out both;
animate-floatanimation: mono-float 2.5s ease-in-out infinite;
animate-iteration-1animation-iteration-count: 1;
View full generated CSS
Compiled CSS
@keyframes mono-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes mono-shake {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-8px);
  }
  40%, 80% {
    transform: translateX(8px);
  }
}
@keyframes mono-wiggle {
  0%, 100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}
.animate-float {
  animation: mono-float 2.5s ease-in-out infinite;
}
.animate-shake {
  animation: mono-shake 450ms ease-in-out both;
}
.animate-wiggle {
  animation: mono-wiggle 700ms ease-in-out both;
}
.animate-iteration-1 {
  animation-iteration-count: 1;
}