18 of 25
Retarget interrupted motion from its current position
When a control reverses mid-transition, continue from its visible position. A CSS transition handles ordinary state changes. A controlled keyframe animation can reverse too.
Do
transition: transform 420ms
transition · 420ms — turns from where it is
Don’t
animation: turn 420ms
Restarted keyframes · 420ms — jumps to a fixed endpoint
Hit Toggle again mid-flight — the Do card turns from where it is, the Don’t card snaps to the far end first
Before you ship
- Does the object jump when its destination changes?
- Does the semantic state reflect the latest input?
- Can a stale completion handler undo a newer choice?