Bouncy 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.
Code
No cubic bezier can draw this curve. CSS linear() follows it with 40 points; the other tabs use each platform's native equivalent.
/* Exact curve (all modern browsers): */
transition: transform 1125ms linear(0, 0.002 0.3%, 0.011 0.8%, 0.042 1.7%, 0.091 2.5%, 0.168 3.5%, 0.244 4.3%, 0.329 5.2%, 0.698 8.5%, 0.838 9.8%, 0.964 11.2%, 1.02 11.8%, 1.07 12.5%, 1.116 13.2%, 1.156 13.8%, 1.212 15%, 1.237 15.7%, 1.256 16.3%, 1.279 17.7%, 1.284 18.5%, 1.282 19.3%, 1.274 20.2%, 1.258 21.2%, 1.21 23.2%, 1.055 28.2%, 0.991 30.7%, 0.964 32%, 0.944 33.3%, 0.93 34.7%, 0.921 36.2%, 0.92 37.8%, 0.927 39.8%, 1.002 49.2%, 1.015 51.8%, 1.022 54.5%, 1.021 58.5%, 1 67.7%, 0.994 72.7%, 1.002 90.2%, 1);Exact CSS
linear() draws any curve with straight segments. This one uses 40 points chosen so the motion never strays more than 0.25 % from the real springBouncy; every current browser supports it.
linear(0, 0.002 0.3%, 0.011 0.8%, 0.042 1.7%, 0.091 2.5%, 0.168 3.5%, 0.244 4.3%, 0.329 5.2%, 0.698 8.5%, 0.838 9.8%, 0.964 11.2%, 1.02 11.8%, 1.07 12.5%, 1.116 13.2%, 1.156 13.8%, 1.212 15%, 1.237 15.7%, 1.256 16.3%, 1.279 17.7%, 1.284 18.5%, 1.282 19.3%, 1.274 20.2%, 1.258 21.2%, 1.21 23.2%, 1.055 28.2%, 0.991 30.7%, 0.964 32%, 0.944 33.3%, 0.93 34.7%, 0.921 36.2%, 0.92 37.8%, 0.927 39.8%, 1.002 49.2%, 1.015 51.8%, 1.022 54.5%, 1.021 58.5%, 1 67.7%, 0.994 72.7%, 1.002 90.2%, 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 (40 points, within 0.25 % of the physics). Set the transition to about 1.12 s, the time this spring takes to settle.
When should I use springBouncy?
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 springBouncy overshoot?
It passes the target by 28.4 % of the distance before settling — about 57 px on a 200 px move.
Other springs
Animate with springBouncy 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.