Spring (default)

Physics instead of a fixed curve: stiffness pulls toward the target, damping bleeds energy off, mass adds inertia. Duration falls out of the physics. A spring has no fixed ease direction: it leaves at the speed the physics gives it and settles with as much bounce as its damping allows.

stiffness 170 · damping 26 · mass 1
0time →1
This curve
Linear
Export finishedlaunch-film.mp4 · 4K
Damping ratio1.00
Settles in0.70 s
OvershootNone
Peak speed3.38×

Code

No cubic bezier can draw this curve. CSS linear() follows it with 21 points; the other tabs use each platform's native equivalent.

/* Exact curve (all modern browsers): */
transition: transform 704ms linear(0, 0.005 1.2%, 0.02 2.3%, 0.045 3.7%, 0.083 5.2%, 0.163 7.8%, 0.363 13.8%, 0.463 17%, 0.558 20.3%, 0.636 23.5%, 0.706 26.8%, 0.768 30.3%, 0.817 33.8%, 0.861 37.7%, 0.9 42.2%, 0.93 47%, 0.954 52.5%, 0.971 58.7%, 0.983 65.5%, 0.991 73.8%, 1);

Exact CSS

linear() draws any curve with straight segments. This one uses 21 points chosen so the motion never strays more than 0.25 % from the real spring; every current browser supports it.

linear(0, 0.005 1.2%, 0.02 2.3%, 0.045 3.7%, 0.083 5.2%, 0.163 7.8%, 0.363 13.8%, 0.463 17%, 0.558 20.3%, 0.636 23.5%, 0.706 26.8%, 0.768 30.3%, 0.817 33.8%, 0.861 37.7%, 0.9 42.2%, 0.93 47%, 0.954 52.5%, 0.971 58.7%, 0.983 65.5%, 0.991 73.8%, 1)

Questions

How do I write this spring in CSS?

CSS has no spring timing function, so use linear() with the points on this page (21 points, within 0.25 % of the physics). Set the transition to about 0.70 s, the time this spring takes to settle.

When should I use spring?

Interactive and responsive motion — drags, toggles, sheets — and any move that should feel alive. Interruptible in real UI. A spring has no fixed ease direction: it leaves at the speed the physics gives it and settles with as much bounce as its damping allows.

Other springs

Animate with spring in Kineform

Pick it from any key, text animator or camera move, or bend it in the graph editor — on a real-time engine with 3D, light, type and video.