logo svelte /motion v0.6.0
FIG-001/ HOOK

shared animation controls.

useAnimationControls() returns a controls object for animate={controls}. Call start, set, or stop once and every subscribed motion component responds with its own matching variant.

  • await controls.start('launch') resolves after every subscribed motion.* component finishes its matching launch variant.
  • controls.set('verified') jumps all subscribers to the final keyframe values synchronously, including transitionEnd values.
  • controls.stop() freezes active element animations and is also called automatically when the hook's component unmounts.
↩ all examples
pattern · controls.start(label) mode · live running source
ready
run 0
category · hook
sheet · sheet 01 / 01
⟳ to re-run