Browse documentation
Reference / Transitions & animation
Animation direction
Play the frames forward, in reverse, or alternate the direction on successive cycles.
Working example
Check the two-pass proof
● Inspection mark
Alternate starts forward and reverses on the next cycle. Give the animation at least two iterations to observe both directions.
<details class="group rounded border p-4">
<summary class="cursor-pointer font-semibold">Check the two-pass proof</summary>
<p class="mt-3 origin-left motion-safe:group-open:animate-wiggle motion-safe:group-open:animate-iteration-2 motion-safe:group-open:animate-direction-alternate">● Inspection mark</p>
</details>Class reference
| Class | CSS declarations |
|---|---|
animate-direction-normal | animation-direction: normal; |
animate-direction-reverse | animation-direction: reverse; |
animate-direction-alternate | animation-direction: alternate; |
animate-direction-alternate-reverse | animation-direction: alternate-reverse; |
View full generated CSS
.animate-direction-alternate {
animation-direction: alternate;
}
.animate-direction-alternate-reverse {
animation-direction: alternate-reverse;
}
.animate-direction-normal {
animation-direction: normal;
}
.animate-direction-reverse {
animation-direction: reverse;
}