Browse documentation

Reference / Transitions & animation

Animated indicators

Spin, ping, pulse, and bounce are looping presets. Set an iteration count when a short cue is enough.

Working example

Keep a text label next to an indicator so its meaning survives reduced motion. This spinner runs for two rotations each time the panel opens.

HTML
<details class="group border p-3">
  <summary class="cursor-pointer">Check the edition</summary>
  <p class="mt-3 flex items-center gap-3">
    <span aria-hidden="true" class="size-4 rounded-full border-2 border-black border-r-transparent motion-safe:group-open:animate-spin motion-safe:group-open:animate-iteration-2"></span>
    Edition checked
  </p>
</details>

Class reference

ClassCSS declarations
animate-spinanimation: mono-spin 1s linear infinite;
animate-pinganimation: mono-ping 1s cubic-bezier(0,0,.2,1) infinite;
animate-pulseanimation: mono-pulse 2s cubic-bezier(.4,0,.6,1) infinite;
animate-bounceanimation: mono-bounce 1s infinite;
animate-noneanimation: none;
View full generated CSS
Compiled CSS
@keyframes mono-bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(.8,0,1,1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0,0,.2,1);
  }
}
@keyframes mono-ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}
@keyframes mono-pulse {
  50% {
    opacity: 0.5;
  }
}
@keyframes mono-spin {
  to {
    transform: rotate(360deg);
  }
}
.animate-bounce {
  animation: mono-bounce 1s infinite;
}
.animate-none {
  animation: none;
}
.animate-ping {
  animation: mono-ping 1s cubic-bezier(0,0,.2,1) infinite;
}
.animate-pulse {
  animation: mono-pulse 2s cubic-bezier(.4,0,.6,1) infinite;
}
.animate-spin {
  animation: mono-spin 1s linear infinite;
}