Gentle spring

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 120 · damping 14 · mass 1
0time →1
This curve
Linear
Export finishedlaunch-film.mp4 · 4K
Damping ratio0.64
Settles in0.95 s
Overshoot7.4 %
Peak speed5.00×

Code

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

/* Exact curve (all modern browsers): */
transition: transform 946ms linear(0, 0.007 1.2%, 0.03 2.5%, 0.066 3.8%, 0.119 5.3%, 0.168 6.5%, 0.236 8%, 0.507 13.5%, 0.623 16%, 0.735 18.7%, 0.825 21.2%, 0.9 23.7%, 0.959 26.2%, 1.007 28.8%, 1.039 31.5%, 1.056 33.5%, 1.066 35.5%, 1.072 37.7%, 1.073 40.2%, 1.064 45.2%, 1.016 59.2%, 1.001 67.3%, 0.995 78.5%, 1);

Exact CSS

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

linear(0, 0.007 1.2%, 0.03 2.5%, 0.066 3.8%, 0.119 5.3%, 0.168 6.5%, 0.236 8%, 0.507 13.5%, 0.623 16%, 0.735 18.7%, 0.825 21.2%, 0.9 23.7%, 0.959 26.2%, 1.007 28.8%, 1.039 31.5%, 1.056 33.5%, 1.066 35.5%, 1.072 37.7%, 1.073 40.2%, 1.064 45.2%, 1.016 59.2%, 1.001 67.3%, 0.995 78.5%, 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 (24 points, within 0.25 % of the physics). Set the transition to about 0.95 s, the time this spring takes to settle.

When should I use springGentle?

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.

How much does springGentle overshoot?

It passes the target by 7.4 % of the distance before settling — about 15 px on a 200 px move.

Other springs

Animate with springGentle 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.