Spring animation generator

Set stiffness, damping and mass, watch the motion and the curve, then copy the spring as code. The CSS version bakes the spring into a linear() easing, so it runs with no JavaScript in every current browser.

The presets are the springs every Motionmart pack is built on.

Questions

What do stiffness, damping and mass do?

Stiffness is how hard the spring pulls toward the target: higher is faster. Damping is friction: lower lets it overshoot and wobble, higher settles it without a bounce. Mass is how heavy the moving thing is: more mass is slower and swings further.

What is the damping ratio?

Damping divided by 2 × √(stiffness × mass). Below 1 the spring overshoots, at 1 it settles as fast as it can without overshooting, above 1 it creeps in slowly.

Can CSS do spring animations?

Yes, with the linear() easing function. It lists points along the curve and the browser joins them, so a spring sampled into linear() plays as a normal CSS transition or animation. It cannot be interrupted mid-flight the way a JavaScript spring can, so use Motion or a physics loop for drag and gestures.

Which values should I use?

For press feedback a fast spring with a small overshoot (stiffness about 700, damping 30). For panels and menus a snappy one (420, 30). For large surfaces no visible wobble (200, 26). Wobbly springs suit playful, liquid UI, not forms.

More free tools · Animation glossary