Browse documentation
Reference / Transitions & animation
Animation timing function
Set the timing curve between animation keyframes. Use a theme easing value or supply a CSS easing function in brackets.
Working example
Reveal in five steps
One impression at a time.
A stepped fade is easiest to see with a longer duration. Keyframe-specific easing, when present, controls the following keyframe interval.
<details class="group rounded border p-4">
<summary class="cursor-pointer font-semibold">Reveal in five steps</summary>
<p class="mt-3 origin-left motion-safe:group-open:animate-fade-in motion-safe:group-open:animate-ease-[steps(5)] motion-safe:group-open:animate-duration-1000">One impression at a time.</p>
</details>Class reference
| Class | CSS declarations |
|---|---|
animate-ease-linear | animation-timing-function: linear; |
animate-ease-in-out | animation-timing-function: cubic-bezier(.4,0,.2,1); |
animate-ease-spring | animation-timing-function: linear(0, .62, 1.12, 1.07, .98, 1); |
animate-ease-bounce | animation-timing-function: linear(0, .18, .48, 1, .8, .92, 1, .96, 1); |
animate-ease-[steps(5)] | animation-timing-function: steps(5); |
View full generated CSS
.animate-ease-\[steps\(5\)\] {
animation-timing-function: steps(5);
}
.animate-ease-bounce {
animation-timing-function: linear(0, .18, .48, 1, .8, .92, 1, .96, 1);
}
.animate-ease-in-out {
animation-timing-function: cubic-bezier(.4,0,.2,1);
}
.animate-ease-linear {
animation-timing-function: linear;
}
.animate-ease-spring {
animation-timing-function: linear(0, .62, 1.12, 1.07, .98, 1);
}