Marcus Andrey Study
Ler em português Library

Motion and Interaction · Step 2 · 8 min read

Springs and physics

A curve describes a motion; a spring describes a force, and the motion follows. Why Apple and Android now use springs by default, how one spring is described with duration and bounce or with damping and stiffness, how to fake one in CSS with linear(), and when a bounce is worth it.

An easing curve is a drawing of one motion. A spring is a rule, and the motion comes out of it, from wherever the thing is and however fast it's going. That difference doesn't matter for a dialog that fades in. It matters a lot the moment a person touches the interface: when they flick a sheet, drag a card and let go, or change their mind halfway through an animation. A curve starts over. A spring carries on. That's why both Apple and Android now use springs as their default.

What you'll be able to do after reading:

  • Explain what a spring animation is, in plain words
  • Describe a spring with duration and bounce, or with damping and stiffness
  • Approximate a spring in CSS with linear(), and know its limits
  • Decide when a bounce helps and when it's in the way

1. A rule, not a drawing

Imagine the element is attached to its target by a spring. Let go, and the spring pulls it there. Two settings decide how:

  • Stiffness: how strongly the spring pulls. Stiffer is faster.
  • Damping: how much the motion is slowed, like friction. Enough damping and it glides into place; less, and it passes the target and bounces back before it settles.

There's no duration in that list. The spring settles when it settles. That's the first surprise for designers used to timelines, and the reason platforms added a "duration" setting on top, as we'll see.

Untick halfway through to see each one change its mind.
A curve and two springs. The springs are drawn in CSS with linear(): I sampled a real spring (mass 1, stiffness 400) every 20 ms and listed the positions. The bouncy one passes its target by 16% and settles. CSS can only fake the shape; a real spring engine also keeps the speed when you interrupt it.Spring values: Marcus Andrey, from the damped spring equation; damping ratios as in Jetpack Compose.

Release the three dots. The first is the ease-out curve from the last lesson. The second is a spring with no bounce: it looks a lot like the curve, but its arrival is softer. The third is a bouncy spring that passes its target by 16% and settles.


2. Why the platforms moved to springs

Now tick the switch and untick it halfway. Every dot here turns around abruptly, from a standstill, because CSS transitions restart their curve from the current position. That jolt is the problem springs solve.

Apple's WWDC23 talk on springs explains it with two goals: position must be continuous (nothing jumps), and so must velocity (nothing changes speed suddenly). A curve has a fixed shape, so "there's no way to represent an initial velocity". A spring "can start with any initial velocity", so the animation "picks up right where the gesture ends", and when it's retargeted mid-flight it keeps the speed it had. Apple's conclusion: springs "are the only type of animation that maintains continuity both for static cases and cases with an initial velocity", and they're now the default animation in SwiftUI (Apple, Animate with springs, WWDC23).

Android says the same. In Jetpack Compose, a spring "can handle interruptions more smoothly than duration-based" animations "because it guarantees the continuity of velocity when target value changes amid animations", and it's the default for many of Compose's animation APIs (Android Developers, Customize animations).

So the rule of thumb: anything a person drags, flicks or can interrupt should be a spring. For a system-triggered fade, a curve is fine.


3. Two ways to describe one spring

WhereThe dialsNo bounceBouncyInterrupt it
SwiftUI (Apple).spring(duration:bounce:): a perceptual duration and a bouncebounce: 0Up to 1; Apple's example uses 0.2Keeps its speed. The default animation in SwiftUI is a spring
Jetpack Compose (Android)spring(dampingRatio, stiffness)DampingRatioNoBouncy = 1MediumBouncy = 0.5, HighBouncy = 0.2Keeps its speed. The default for many animation APIs
CSSNo spring. A linear() list of points copies one spring's shape, at a fixed durationPoints that never pass 1Points above 1, then backRestarts from zero speed
Figma prototypesPresets Gentle, Quick, Bouncy and Slow, or a custom spring: stiffness, damping, massCheck the graph in the panelBouncy, or less dampingA prototype, not code
The same idea, four sets of dials. Apple talks in duration and bounce, Android in damping and stiffness; both describe one spring. Ask your developers which one your platform uses before you write the spec.Sources: Apple, WWDC23 "Animate with springs" and SwiftUI documentation; Android Developers, Compose animation and Spring reference; MDN, linear(); Figma Help.

Apple: duration and bounce. SwiftUI's .spring(duration:bounce:) hides the physics behind two settings designers already think in. The duration is a "perceptual duration": roughly how long the spring takes to settle, chosen to stay predictable even when the other settings change. The bounce goes from 0, "no bounces (a critically damped spring)", up to 1, an endless oscillation; negative values give an overdamped spring with a long, slow tail (Apple, SwiftUI spring(duration:bounce:blendDuration:); WWDC23). Apple's own example uses a duration of 0.6 s and a bounce of 0.2.

Android: damping ratio and stiffness. Compose's spring() takes a dampingRatio and a stiffness, with named values (Android Developers, Spring):

Damping ratio Value
DampingRatioNoBouncy 1.0
DampingRatioLowBouncy 0.75
DampingRatioMediumBouncy 0.5
DampingRatioHighBouncy 0.2
Stiffness Value
StiffnessVeryLow 50
StiffnessLow 200
StiffnessMediumLow 400
StiffnessMedium 1500

The two systems describe the same thing. A damping ratio of 1 is Apple's bounce of 0. Lower damping is more bounce. Higher stiffness is a shorter duration. When you write a spec, use the dials of the platform you're designing for, and ask a developer which one that is.


4. Springs on the web

CSS has no spring. What it has, since December 2023 in every major browser, is linear(): an easing made of a list of points joined by straight lines (MDN, linear()). Give it enough points and it draws any shape, including a bounce: Chrome's team showed how to approximate bounce and spring curves this way, and points to a generator by Jake Archibald and Adam Argyle that turns a spring into a linear() list (Chrome for Developers, Create complex animation curves in CSS with linear()).

The springs in the demo were made that way. I took a real damped spring, mass 1 and stiffness 400 (Compose's StiffnessMediumLow), with a damping ratio of 1 and of 0.5 (NoBouncy and MediumBouncy), and wrote down its position every 20 ms. This is the real CSS:

.mo-a-sp-flat .mo-a-dot { transition: transform 400ms linear(0, 0.062, 0.191, 0.337, 0.475, 0.594, 0.692, 0.769, 0.829, 0.874, 0.908, 0.934, 0.952, 0.966, 0.976, 0.983, 0.988, 0.991, 0.994, 0.996, 1); }
.mo-a-sp-bounce .mo-a-dot { transition: transform 600ms linear(0, 0.069, 0.237, 0.449, 0.662, 0.849, 0.994, 1.092, 1.146, 1.163, 1.153, 1.127, 1.092, 1.057, 1.026, 1.002, 0.986, 0.977, 0.973, 0.975, 0.979, 0.985, 0.99, 0.995, 0.999, 1.002, 1.004, 1.004, 1.004, 1.003, 1); }

Read the second list and you can see the bounce: the numbers climb past 1 to 1.163, dip under 1, and settle.

The limits are worth knowing. A linear() spring is still a curve: it has a fixed duration and a fixed shape, it starts from zero speed, and it can't take the velocity of a gesture or keep it when interrupted. For a real spring on the web, developers use JavaScript, which Step 5 covers in Web Animations and View Transitions.


5. When to bounce

A bounce is Disney's exaggeration principle: it makes motion more alive and more noticeable. That's exactly why it should be rare.

  • Bounce where the person's hand is. A card that snaps back when you drop it in the wrong place, a sheet you flick closed, a pull-to-refresh: a small bounce makes the physics feel real.
  • Little or no bounce where the system moves things. A dialog, a page transition, a menu. Here a bounce is a delay with decoration.
  • Keep it small. Apple's example bounce is 0.2. The 0.5 spring in the demo is there so you can see it; in a work tool it would feel like a toy.
  • No bounce with reduced motion. An overshoot makes the movement bigger than it needs to be. In the reduced version, use no bounce, or a fade (Designing a reduced-motion version).

6. Common mistakes

  • Using a curve for something the person drags or flicks, so it jolts when they let go.
  • Bounce on every component, until the product feels like a toy.
  • Specifying a spring as "bouncy" instead of with two numbers.
  • Mixing Apple's and Android's dials in one spec without saying which is which.
  • Treating a linear() spring as a real one and expecting it to handle interruptions.

7. Vocabulary

Term Meaning
Spring An animation driven by a simulated spring force instead of a fixed curve
Stiffness How strongly the spring pulls; stiffer is faster
Damping How much the motion is slowed; less damping, more bounce
Critically damped The least damping with no overshoot; Compose's ratio 1, Apple's bounce 0
Velocity Speed and direction; springs keep it, curves restart from zero
Perceptual duration Apple's setting for roughly how long a spring takes to settle
linear() A CSS easing made of points; can copy a spring's shape, not its physics

8. Try it (no tools needed)

  1. On your phone, drag a notification or a sheet halfway and let go, slowly. Then do it again with a fast flick.
  2. Watch how the motion after you let go changes with your speed.
  3. Now tap a button that opens a dialog, and tap again quickly to close it while it's still opening.

Reflection questions: Did the interface follow your hand, or did it restart its own animation? Where would a bounce make the second case feel better, and where worse?


9. If you already practise

  • In specs for native apps, describe springs with the platform's own two numbers and a short video for feel.
  • Pick two or three springs for the product, like "snappy, no bounce" and "playful, small bounce", and add them to the motion tokens next to the curves.
  • For the web, keep the linear() lists in tokens too, generated from the same springs as the native apps, so the products feel related.

Checklist

Learn more

Books, courses and videos to go deeper

Book links go to Amazon. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.

Easing curves · Choreography and stagger · Gestures and direct manipulation · Web Animations and View Transitions · Prototyping motion in Figma · Spring parameter guide

Saved only on this device.

↑ ↓ to move · Enter to open · Esc to close