Pick a spring by how long it takes and how much it bounces
Every spring on this site is written as a duration and a bounce, because those are the two numbers I can say out loud and argue about. This is where I pick them before they go into code.
Drag the peak and the settle line, then pull the puck
0.45s · 0.15 · Interface
How far it has moved, over time
Drag the puck, then let go
Let go of the puck to compare
Stiffness, damping and mass each change how long a spring takes and how much it bounces, so moving one undoes another. Duration and bounce ask those two questions separately. Motion and SwiftUI accept springs in this form, and the export still gives you stiffness and damping for libraries that only take those.
Copy as
Link
{ type: "spring", duration: 0.45, bounce: 0.15 }.spring(duration: 0.325, bounce: 0.15)450ms linear(0, 0.0219, 0.0771, 0.1529, 0.2397, 0.3304, 0.42, 0.5053, 0.584, 0.6551, 0.7179, 0.7725, 0.8193, 0.8587, 0.8916, 0.9185, 0.9403, 0.9577, 0.9713, 0.9819, 0.9898, 0.9957, 0.9999, 1.0027, 1.0046, 1.0057, 1.0062, 1.0063, 1.0061, 1.0057, 1.0052, 1.0046, 1.0041, 1.0035, 1.003, 1.0025, 1.0021, 1.0017, 1.0014, 1)stiffness: 372.9, damping: 32.83, mass: 1