← Writing
5 min read

Springs vs cubic-bezier: when physics beats a curve

A spring has no duration, and that is the whole point. What springs model that easing curves cannot, the three parameters that matter, and when a curve is still the better tool.

  • easing
  • fundamentals

Most interface motion is a cubic-bezier curve evaluated over a fixed duration: 250ms, ease-out, done. It is predictable, cheap, and expressible in one line of CSS.

Springs work differently. You do not specify how long the motion takes. You specify the physical properties of a system, and the duration falls out of the simulation. That sounds like a downside until you hit the cases where it is the only thing that works.

What a spring actually models

A spring animation simulates a mass attached to a spring, pulled toward a target and slowed by friction. Three parameters:

Stiffness: how strongly the spring pulls toward the target. Higher is faster and more urgent.

Damping: how much friction resists the motion. Low damping oscillates; high damping glides in and stops.

Mass: how much inertia the object has. Higher mass makes everything feel heavier and slower to start.

The useful mental model is that you are not describing a path, you are describing a material. Two springs with the same parameters behave consistently whether they travel 10 pixels or 500, which is exactly what a fixed-duration curve cannot do.

The three behaviours

Underdamped: overshoots the target and oscillates back. This is what people usually mean by “springy.” Good for playful confirmation and direct manipulation; bad for anything serious or repeated.

Critically damped: reaches the target as fast as possible without overshooting. This is the sweet spot for most interface work, and it is worth knowing it exists, because a lot of people assume “spring” means “bouncy.”

Overdamped: approaches slowly, no overshoot. Sluggish, rarely what you want.

A critically damped spring feels like an ease-out that got the deceleration exactly right. Which raises the obvious question.

So why not just use a curve?

For most animations, you should. The case for springs comes down to one thing that curves genuinely cannot do: handle interruption gracefully.

A cubic-bezier animation is a function of elapsed time. It assumes it starts at rest, ends at rest, and runs to completion. Interrupt it halfway and you have a problem. The element has a position, but the new animation starts a fresh timeline from zero. The result is a visible discontinuity: the thing stops dead and restarts.

You can paper over this. Most component libraries do, by cancelling and re-timing. But the artefact is always there, because the model has no concept of the element’s current velocity.

A spring does. It is a function of state (current position and current velocity), not elapsed time. Retarget it mid-flight and it carries the existing velocity into the new motion. Nothing stops; the destination changes and the object curves toward it.

This is why springs dominate anywhere the user can grab something:

  • Drag a sheet halfway and release, and the sheet continues with the velocity you gave it
  • Fling a carousel and it decelerates naturally and settles
  • Toggle a switch repeatedly and it never snaps or stutters
  • Drag an element while it is already animating somewhere

If the user cannot interrupt the animation, that advantage is worth nothing, and a curve is simpler.

The parameters people actually tune

In practice, most spring APIs expose stiffness and damping, sometimes mass, sometimes friendlier aliases like bounce and duration.

Rough starting points for interface work:

  • Snappy, no bounce: high stiffness, damping at or slightly above critical. Menus, toggles, most UI.
  • Gentle: lower stiffness, high damping. Large surfaces, sheets, anything heavy.
  • Playful: moderate stiffness, damping below critical for one or two visible oscillations. Confirmation moments only.

The failure mode is always the same: too little damping. One overshoot reads as physical. Three reads as broken, and on a control someone uses fifty times a day, even one can grate. Applied to a bottom sheet on a phone, an underdamped spring is the difference between “premium” and “cheap.”

Springs in CSS

CSS has no native spring, but linear() gets close by taking a list of sampled points and interpolating between them:

.thing {
  transition: transform 600ms linear(
    0, 0.006, 0.132, 0.361, 0.618, 0.84, 0.984, 1.06,
    1.08, 1.07, 1.04, 1.014, 0.999, 0.994, 0.996, 1
  );
}

Those values above 1 are the overshoot. This is a genuine spring shape, and it is the right tool for a looping or non-interruptible spring-like motion, like a bounce-in or an attention pulse.

What it is not is a spring model. It is a baked curve: fixed duration, no velocity, no retargeting. It gives you the look without the behaviour. For anything the user can interrupt you need a real simulation, which means JavaScript: the Web Animations API driving a solver, or a library that ships one.

There is also a real cost to the look-alike: because the duration is fixed, the same linear() applied to a 20px move and a 400px move produces very different perceived speeds, and you are back to the problem springs were supposed to solve.

When to use which

Situation Reach for
Enter, exit, hover, most state changes cubic-bezier
Anything the user can grab, drag, or fling spring
Motion retargeted mid-flight spring
Distances that vary a lot across instances spring
Looping or attention motion linear() or keyframes
You need it in one line of CSS cubic-bezier

The honest summary: springs are for direct manipulation, curves are for everything else. Reaching for a spring on a tooltip fade adds a dependency and a simulation to solve a problem that cubic-bezier(0.33, 1, 0.68, 1) already solved.

Where springs earn their keep, though, nothing else comes close, because the thing they model is not the shape of the motion but the continuity of it. See which easing curve to use for the cubic-bezier side of the decision.