Skip to main content
Spring animations use a physics-based model for natural-feeling motion. Rather than completing in a fixed duration, a spring settles when the simulated physics reach equilibrium. This makes spring ideal for interactive elements and enter animations where motion should feel alive.
On iOS, CASpringAnimation receives damping, stiffness, and mass directly. On Android, SpringAnimation derives its damping ratio from these values using: dampingRatio = damping / (2 * sqrt(stiffness * mass)).

Parameters

Parameter intuition

  • damping controls how quickly oscillation dies out. A low damping value (e.g. 8) produces noticeable bounce; a high value (e.g. 20) reaches the target without overshoot.
  • stiffness controls the speed of the animation. Higher stiffness means the spring pulls harder and the animation completes faster.
  • mass adds inertia. Heavier objects take longer to accelerate and decelerate, producing a weighty feel.

Spring Presets

These presets cover the most common animation feels:

Example

Spring animations do not support the loop option. Use a timing animation with loop: 'repeat' or loop: 'reverse' for looping effects.
On Android, the damping ratio passed to SpringAnimation is derived from damping, stiffness, and mass using the formula damping / (2 * sqrt(stiffness * mass)). The three parameters are not passed to Android directly, but the resulting motion closely matches iOS for typical values.