Framework · Motion & interaction · 3 min read
Spring parameter guide
How the three settings of a spring (stiffness, damping, mass) turn into speed and bounce, how the damping ratio tells you at a glance whether it overshoots, and how to pick values for gestures and for system moves.
Fast, passes the target and springs back.
Fine for a flick, loud for a dialogFast, arrives without a bounce.
A good default for interface movesSlow and keeps oscillating.
Feels like a toy in a work toolSlow, long soft tail into place.
Large, calm moves, used rarelyUse it when
- You spec motion for something a person drags, flicks or can interrupt.
- A developer asks for "the spring values" and the prototype only says "bouncy".
- Your design tool and the platform describe springs in different settings and you need to translate.
How to use it
- Decide whether it should be a spring. Anything a hand moves or can interrupt: yes, because a spring keeps the speed of the gesture. A system-triggered fade: a curve is fine. Output: spring or curve, per pattern.
- Pick the bounce first, as a damping ratio. ζ = damping ÷ (2 × √(stiffness × mass)). Use 1 (no bounce) for system moves, a little below 1 where the hand is, and never a big bounce in a work tool. Output: a damping ratio per pattern.
- Then pick the speed with stiffness. Higher stiffness is faster. Keep mass at 1 unless your tool insists: it's easier to compare. Output: a stiffness value.
- Check overshoot and settle time. Put the values in the calculator below or in your prototyping tool. Overshoot is how far it passes the target; settle time is when it stays within 2% of it. Output: two numbers you can put in the spec.
- Translate to the platform's dials. Android takes a damping ratio and a stiffness. Apple takes a duration and a bounce, where bounce 0 is a critically damped spring. Web libraries usually take stiffness, damping and mass. Ask a developer which one you're writing for. Output: the values in the developer's units.
- Write the reduced-motion version. No bounce, or a fade. An overshoot makes the movement bigger than it needs to be. Output: the reduced row of the spec.
Worked example
In a task app for small teams, a task's details open in a bottom sheet that people flick closed on the phone. The prototype's spring overshoots so much the sheet looks loose. The designer starts from the lesson's numbers: mass 1, stiffness 400, damping 20, a damping ratio of 0.5. That's about 16% overshoot, settling in about 400 ms. Too much for a sheet with a due date and an assignee on it.
They raise damping to 32 (ratio 0.8): a small overshoot of about 1.5%, settling in under 200 ms. The sheet still answers the flick, without wobbling. The dialog that confirms deleting a board gets ratio 1, no bounce at all. With reduced motion on, both fade. Try the values below.
The sheet from the example, live. Change the three settings and watch the curve: the dashed line is the target, everything above it is overshoot. Most tools take these three; Android takes a damping ratio and a stiffness, with a mass of 1.
Reduced motion is on, so the dot stays still: the curve shows the same motion.
Watch out for
- "Bouncy" as a spec. Nobody can build an adjective. Give the damping ratio and the stiffness, or the platform's two numbers.
- Bounce on system moves. A dialog or a page transition that overshoots is a delay with decoration.
- Comparing springs with different masses. Mass changes both the speed and the bounce. Keep it at 1 and change the other two.
- A spring faked as a fixed curve where a hand moves it. A
linear()approximation in CSS has a fixed duration and starts from zero speed. For gestures, it needs a real spring in code.
Template
Add this to the motion spec for every spring.
Pattern: ... Moved by: a gesture / the system
Spring: stiffness ... damping ... mass 1
Damping ratio: damping / (2 x sqrt(stiffness x mass)) = ...
Overshoot: ...% Settles (within 2%): ... ms
Platform values: Android dampingRatio ... stiffness ... / Apple duration ... bounce ...
Interruption: keeps the current velocity
Reduced motion: no bounce / fade, ... ms
- Animation at WorkRachel NaborsBook · 2017 (Amazon)
- Animate with springsApple, WWDC23 (external site)
- SpringAndroid Developers (external site)
- Customize animationsAndroid Developers (external site)
"See on Amazon" links are affiliate links. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.