Spring Physics
Animazione a molla · Animación con muelle · Spring animation · Fisica a molla · Overshoot and settle
Elements move not over a fixed duration but as if attached to a spring, overshooting the target slightly and then settling. The motion feels physical and responsive, and can be interrupted mid-flight without jumps.
- Era
- 2013 – today
- Use
- Mainstream
Live demo
View code
<main>
<h1>Molle</h1>
<div class="row"><label>rigida</label><div class="tr"><i id="a" style="background:#4ECDC4"></i></div></div>
<div class="row"><label>morbida</label><div class="tr"><i id="b" style="background:#FF6B35"></i></div></div>
<div class="row"><label>elastica</label><div class="tr"><i id="c" style="background:#9A8CFF"></i></div></div>
<svg viewBox="0 0 300 60" aria-hidden="true"><path d="M0 52 L60 52 C 90 52 95 2 120 4 S 150 26 170 18 S 200 10 215 14 S 260 12 300 12" fill="none" stroke="#22223B" stroke-width="2"/><path d="M0 12 H300" stroke="#22223B40" stroke-dasharray="4 4"/></svg>
</main>
<script>
const $=id=>document.getElementById(id),S=[{e:$('a'),k:380,d:30},{e:$('b'),k:160,d:14},{e:$('c'),k:220,d:7}].map(o=>({...o,x:0,v:0}));let target=0;
function place(){S.forEach(s=>{const w=s.e.parentNode.offsetWidth-28;s.e.style.transform=`translateX(${s.x*w}px)`})}
place();
if(matchMedia('(prefers-reduced-motion: no-preference)').matches){
setInterval(()=>target=target?0:1,1800);let last=performance.now();
(function f(now){const dt=Math.min(.032,(now-last)/1000);last=now;
S.forEach(s=>{const F=-s.k*(s.x-target)-s.d*s.v;s.v+=F*dt;s.x+=s.v*dt});place();requestAnimationFrame(f)})(last);
}
</script> body{margin:0;height:100vh;display:grid;place-items:center;overflow:hidden;background:#FFF6E9;color:#22223B;font-family:Lexend,sans-serif}
main{width:min(380px,92vw)}
h1{margin:0 0 12px;font-weight:700;font-size:26px}
.row{display:flex;align-items:center;gap:12px;margin-bottom:12px}
label{width:70px;font-size:13px;color:#5a5a73}
.tr{flex:1;height:28px;border-radius:14px;background:#22223B12;position:relative}
.tr i{position:absolute;left:0;top:0;width:28px;height:28px;border-radius:50%;box-shadow:0 4px 10px #22223B30}
svg{width:100%;height:auto;display:block;margin-top:6px} Characteristics
- Stiffness damping and mass instead of duration
- Overshoot then a decaying oscillation
- Velocity preserved when interrupted
- Stiff springs for UI and loose ones for playful bits
- Used by iOS and modern animation libraries
Palette
Click a swatch to copy it
Typography
Headings · Lexend Spring Physics
Body · Lexend Elements move not over a fixed duration but as if attached to a spring, overshooting the target slightly and then settling. The motion feels physical and responsive, and can be interrupted mid-flight without jumps.
Motion
- Easing
molla smorzata (es. stiffness 170, damping 26; più rimbalzo con damping 10–15)- Typical duration
- emergente dalla fisica, di solito 300–900 ms
- Techniques
- Framer Motion / Motion type spring, React Spring, CSS linear() con curva a molla precalcolata, SwiftUI spring, Popmotion / GSAP elastic, integrazione semi-implicita di Eulero in requestAnimationFrame
Accessibility (reduced motion)
Use a critically damped spring (no bounce) or a short transition with no overshoot.
Prompt for your agent
Copy and paste into your prompt to have an agent or image generator reproduce this style.
For web pages and UI
Design the web page or interface in this style: Spring Physics (Animazione a molla, Animación con muelle). Elements move not over a fixed duration but as if attached to a spring, overshooting the target slightly and then settling. The motion feels physical and responsive, and can be interrupted mid-flight without jumps. Characteristics: Stiffness damping and mass instead of duration, Overshoot then a decaying oscillation, Velocity preserved when interrupted, Stiff springs for UI and loose ones for playful bits, Used by iOS and modern animation libraries. Palette: #FFF6E9, #22223B, #FF6B35, #4ECDC4, #9A8CFF. Typography: headings in Lexend, body text in Lexend (Google Fonts or equivalents). Mood: playful, energetic, tactile. Motion: easing molla smorzata (es. stiffness 170, damping 26; più rimbalzo con damping 10–15), typical duration emergente dalla fisica, di solito 300–900 ms; techniques: Framer Motion / Motion type spring, React Spring, CSS linear() con curva a molla precalcolata, SwiftUI spring, Popmotion / GSAP elastic, integrazione semi-implicita di Eulero in requestAnimationFrame. With prefers-reduced-motion: Use a critically damped spring (no bounce) or a short transition with no overshoot. References: Apple WWDC «Animate with springs», React Spring, Framer Motion «spring» transition, Josh Comeau «A Friendly Introduction to Spring Physics».
Relations
References
- Apple WWDC «Animate with springs»
- React Spring
- Framer Motion «spring» transition
- Josh Comeau «A Friendly Introduction to Spring Physics»