Material 3 Expressive default spatial
Material 3 documents the default spatial spec for animations that may change the shape or bounds of a component. Stiffness 380, damping 31.19 and mass 1 give a damping ratio of 0.8, so the spring is underdamped. It settles to within 0.1% in 0.435 s. It passes the end value by up to 1.5% at 0.269 s and crosses it 1 time.
Demo
Both boxes take 0.435 s. Playing at 0.5× speed.
Your system asks for reduced motion, so nothing plays. The chart shows the whole move.
Code
A spring has no fixed duration, so the CSS takes the settle time (435 ms) and a linear() string that follows the spring.
transition: translate 435ms linear(0, 0.0053, 0.0201, 0.0426, 0.0716, 0.1056, 0.1435, 0.1844, 0.2273, 0.2714, 0.3163, 0.3612, 0.4056, 0.4493, 0.4919, 0.533, 0.5726, 0.6104, 0.6463, 0.6803, 0.7123, 0.7422, 0.7702, 0.7961, 0.8201, 0.8423, 0.8626, 0.8811, 0.898, 0.9133, 0.9271, 0.9395, 0.9506, 0.9605, 0.9693, 0.977, 0.9837, 0.9895, 0.9946, 0.9989, 1.0026, 1.0056, 1.0081, 1.0102, 1.0118, 1.0131, 1.014, 1.0146, 1.015, 1.0151, 1.0151, 1.015, 1.0147, 1.0143, 1.0138, 1.0132, 1.0126, 1.012, 1.0113, 1.0106, 1.01, 1.0093, 1.0086, 1.008, 1.0073, 1.0067, 1.0061, 1.0056, 1.005, 1.0046, 1.0041, 1.0037, 1.0032, 1.0029, 1.0025, 1.0022, 1.0019, 1.0016, 1.0014, 1.0012, 1);el.animate({ translate: ['0 0', '240px 0'] }, { duration: 435, easing: 'linear(0, 0.0053, 0.0201, 0.0426, 0.0716, 0.1056, 0.1435, 0.1844, 0.2273, 0.2714, 0.3163, 0.3612, 0.4056, 0.4493, 0.4919, 0.533, 0.5726, 0.6104, 0.6463, 0.6803, 0.7123, 0.7422, 0.7702, 0.7961, 0.8201, 0.8423, 0.8626, 0.8811, 0.898, 0.9133, 0.9271, 0.9395, 0.9506, 0.9605, 0.9693, 0.977, 0.9837, 0.9895, 0.9946, 0.9989, 1.0026, 1.0056, 1.0081, 1.0102, 1.0118, 1.0131, 1.014, 1.0146, 1.015, 1.0151, 1.0151, 1.015, 1.0147, 1.0143, 1.0138, 1.0132, 1.0126, 1.012, 1.0113, 1.0106, 1.01, 1.0093, 1.0086, 1.008, 1.0073, 1.0067, 1.0061, 1.0056, 1.005, 1.0046, 1.0041, 1.0037, 1.0032, 1.0029, 1.0025, 1.0022, 1.0019, 1.0016, 1.0014, 1.0012, 1)', fill: 'both' });import { spring, springDuration, springLinear } from '../../core/motion/springs.js';
const k = 380, d = 31.19;
// per-frame code (window.seek, vawe.onFrame): t is seconds since the move starts
const x = 240 * spring(t, k, d);
// CSS and Web Animations: 435 ms, the linear() string above
el.animate(
{ translate: ['0 0', '240px 0'] },
{ duration: springDuration(k, d) * 1000, easing: springLinear(k, d), fill: 'both' },
);Numbers
- Stiffness
- 380k, with mass 1
- Damping
- 31.19d, with mass 1
- Damping ratio
- 0.8underdamped
- Settle time
- 0.435 swithin 0.1% of the end
- Overshoot
- 1.5%peak at 0.269 s
- Crosses the end
- 1time
- 50% of travel
- 0.078 s18% of the settle time
- 90% of travel
- 0.153 s35% of the settle time
- Natural frequency
- 19.49 rad/ssqrt(k)
- Ring period
- 0.537 sone swing of the overshoot
- Peak speed
- 3.59xtimes the average speed
- linear() points
- 81within 0.13% of travel
Computed with spring() and springDuration() from core/motion/springs.js. The settle time is the last moment the spring is more than 0.1% away from the end value; a library stops its own spring by its own rest thresholds, so its clock can run shorter.
Source of the numbers
| Material 3 | androidx main at 9adbcd8 (compose material3 1.6.0-alpha01) |
| damping ratio 0.8, stiffness 380 (MotionScheme.expressive().defaultSpatialSpec()) | ExpressiveMotionTokens.SpringDefaultSpatialDamping (0.8) and SpringDefaultSpatialStiffness (380) |
Conversion: Stiffness is used as it is with mass 1 (SpringSimulation takes the natural frequency as sqrt(stiffness)). damping = 2 x dampingRatio x sqrt(stiffness), the same c = 2 x naturalFreq x dampingRatio that SpringSimulation.getAcceleration uses.
Related springs
The four closest curves in this set, by the average gap between the two springs over their first seconds. A gap of 0.01 is invisible; 0.1 is a different feel.