Browse documentation
Reference / Transitions & animation
Animation composition
Control how animated values combine with the element’s underlying property value. Replace is the CSS default.
Working example
Inspect the angled label
Edition 01
In this sample add combines the resting tilt and the animated rotation. With replace, the keyframes supply the entire transform while the animation runs.
<details class="group rounded border p-4">
<summary class="cursor-pointer font-semibold">Inspect the angled label</summary>
<p class="mt-3 origin-left rotate-3 motion-safe:group-open:animate-wiggle motion-safe:group-open:animate-composition-add">Edition 01</p>
</details>Class reference
| Class | CSS declarations |
|---|---|
animate-composition-replace | animation-composition: replace; |
animate-composition-add | animation-composition: add; |
animate-composition-accumulate | animation-composition: accumulate; |
View full generated CSS
.animate-composition-accumulate {
animation-composition: accumulate;
}
.animate-composition-add {
animation-composition: add;
}
.animate-composition-replace {
animation-composition: replace;
}