Notes

Springs keep their momentum, Bézier curves don't

8 October 2026 2 min read

A cubic-bezier is a fixed path through time. A spring is a rule. Only the rule survives being interrupted.

  • Motion
  • Animation physics
  • CSS

Every easing curve is a promise: this will take 400 milliseconds and look like this. People break that promise with their fingers. They tap again, change their mind, grab the thing while it moves.

180

Bézier, 400 mscubic-bezier(0.4, 0, 0.2, 1)

Springstiffness 180, damping ratio 0.6

Position, last 2.4 seconds BézierSpring

Press Interrupt. The Bézier curve restarts with zero speed and kinks. The spring keeps its momentum.

Live demo. Everything runs in your browser. Now try to break it.
SpringVsBezier.svelte, 146 lines

Press Right, then Left, and watch the two dots. They look similar. Now press Interrupt. The Bézier dot turns around with a small jolt, and the graph underneath shows why: a kink in the line. The spring dot bends around the turn.

What an interruption does to a curve

A CSS transition is a curve over a fixed time. When the target changes halfway, the browser starts a new transition from the current value. The position is continuous, but the speed is not. The new curve begins with the easing's own start, which is usually slow, so a thing that was moving quickly suddenly eases out of nothing.

A spring does not have a start. It has a state, position and velocity, and a rule that turns the distance to the target into a force:

// semi-implicit Euler, one frame
const damping = 2 * ratio * Math.sqrt(stiffness);
velocity += (-stiffness * (position - target) - damping * velocity) * dt;
position += velocity * dt;

Change target at any moment and nothing is restarted. The velocity carries over, and the force simply points somewhere else. That is the entire trick.

Two numbers instead of a curve

A Bézier has a duration and four control points that nobody can read. A spring has stiffness and a damping ratio, and both mean something. Stiffness is how hard the target pulls. The damping ratio is how much friction there is. Below 1 the thing overshoots and settles, at 1 it arrives without overshoot, above 1 it creeps.

Overshoot is a design decision. A card that lands with a small bounce feels playful. A balance that bounces after a transfer feels wrong. Use a ratio of 1 where the content is serious. You still get the momentum.

Where Bézier is still the right tool

  • Fixed choreography. Nothing the user can interrupt, like a page transition that runs once.
  • Opacity and colour. Overshooting an opacity makes no sense.
  • Very short things. Under about 150 ms nobody can see the shape of the curve.

CSS linear() can draw a spring-shaped curve with many points. It looks right, but it is still a fixed curve. Interrupt it and it restarts like any other transition.

The cost

A spring runs in JavaScript on the main thread, one frame at a time. For gestures that follow a finger, sheets that can be dragged, and anything interruptible, that is worth it. For a hover colour it is not. Most animation libraries ship a spring, so you rarely need to write the integrator yourself.

And respect prefers-reduced-motion. Replace the movement with a short fade or an instant change. Keep the feedback, drop the travel.

Related

How bright was it?

Five lamps and an optional line. Feedback, a bug, an idea, anything. I read every one and sum them up once a month.

Pick a lamp

Stored without name, address or cookie, and deleted after a year. Details in the privacy notice.