Springs, without the math headache
Duration-based animations ask a question: how long should this take? Spring animations ask a different one: what is this made of?
That shift is why springs feel so natural. Instead of choosing a time and a curve, you describe a physical object — how tight the spring is, how much friction there is, how heavy the thing on the end is — and let the simulation work out the motion.
The three knobs
Stiffness is how strongly the spring pulls towards its target. High stiffness snaps into place; low stiffness drifts there lazily.
Damping is friction. Low damping lets the object overshoot and wobble back and forth. High damping kills the wobble so it glides in and stops.
Mass is weight. A heavier object takes longer to get going and longer to stop. In practice you can usually leave mass at 1 and tune the other two.
Stiffness decides how eager it is. Damping decides how calm it is.
Starting values that work
You’ll find your own favourites, but these are good places to begin:
const gentle = { stiffness: 120, damping: 20, mass: 1 }; // soft, no bounce
const snappy = { stiffness: 400, damping: 30, mass: 1 }; // quick, settled
const bouncy = { stiffness: 260, damping: 12, mass: 1 }; // playful overshoot
Use gentle for large surfaces like sheets and panels, snappy for most interface feedback, and save bouncy for moments that deserve a bit of joy — a like, a success state, a small celebration.
Why springs shine on interruption
The real superpower of springs isn’t the bounce. It’s what happens when the user changes their mind halfway through.
A duration-based animation that gets interrupted has to start a new animation from wherever it was, usually with an awkward jolt in speed. A spring simply keeps its current velocity and starts pulling towards the new target. Drag a sheet down, flick it back up, and the motion stays continuous the whole way. Nothing snaps.
That’s why springs are the natural choice for anything driven by gestures: dragging, swiping, pulling to refresh, throwing a card away.
When not to use a spring
Springs never technically finish; they settle within some tiny threshold. That makes them awkward when you need precise timing — a sequence synced to audio, or a choreographed series of steps that must line up. For those, a good old duration and curve is still the right tool.
Start by replacing one hover or press animation with a snappy spring. Then try interrupting it. Once you feel the difference, it’s hard to go back.