Browse documentation
Reference / Transitions & animation
Animation iteration count
Choose how many times an animation cycles. Whole numbers, fractions, and infinite are supported.
Working example
Pulse twice
● Printer online
A fractional count stops during the final cycle. Pair it with a forwards fill mode when the endpoint should stay visible.
<details class="group rounded border p-4">
<summary class="cursor-pointer font-semibold">Pulse twice</summary>
<p class="mt-3 origin-left motion-safe:group-open:animate-pulse motion-safe:group-open:animate-iteration-2 motion-safe:group-open:animate-duration-700">● Printer online</p>
</details>Class reference
| Class | CSS declarations |
|---|---|
animate-iteration-1 | animation-iteration-count: 1; |
animate-iteration-2 | animation-iteration-count: 2; |
animate-iteration-3 | animation-iteration-count: 3; |
animate-iteration-1.5 | animation-iteration-count: 1.5; |
animate-iteration-infinite | animation-iteration-count: infinite; |
View full generated CSS
.animate-iteration-1 {
animation-iteration-count: 1;
}
.animate-iteration-1\.5 {
animation-iteration-count: 1.5;
}
.animate-iteration-2 {
animation-iteration-count: 2;
}
.animate-iteration-3 {
animation-iteration-count: 3;
}
.animate-iteration-infinite {
animation-iteration-count: infinite;
}