easeInOutCubic
It is slow at both ends and fast in the middle. The usual default curve: a firm start or stop that most viewers read as natural.
easeInOutCubic reaches 50% of its travel at 50% of the time and 90% at 71%. Its peak speed is 3x the average.
Live demo
The blue box uses the exact linear() string below, in your browser. The grey box is linear.
Your system asks for reduced motion, so the boxes rest at the end of the move.
Numbers
- 50% of travel
- 50%of the time
- 90% of travel
- 71%of the time
- After 10% of time
- 0.4%of the travel is done
- Peak speed
- 3xtimes the average
- Overshoot
- 0%stays inside the end
- Undershoot
- 0%never below the start
- linear() points
- 41at a 0.002 tolerance
- cubic-bezier
- closeworst gap 0.9 points
Copy the code
animation-timing-function: linear(0, 0.0001, 0.0005, 0.0017, 0.004, 0.0078, 0.0135, 0.0214, 0.032, 0.0456, 0.0625, 0.0832, 0.108, 0.1373, 0.1715, 0.2109, 0.256, 0.3071, 0.3645, 0.4287, 0.5, 0.5713, 0.6355, 0.6929, 0.744, 0.7891, 0.8285, 0.8627, 0.892, 0.9168, 0.9375, 0.9544, 0.968, 0.9786, 0.9865, 0.9922, 0.996, 0.9983, 0.9995, 0.9999, 1);animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);Least-squares fit to the easeInOutCubic curve; the worst gap is 0.9 points of travel. It is close, not exact: use linear() when the end of the curve matters.
el.animate({ translate: ['0 0', '240px 0'] }, { duration: 600, easing: 'linear(0, 0.0001, 0.0005, 0.0017, 0.004, 0.0078, 0.0135, 0.0214, 0.032, 0.0456, 0.0625, 0.0832, 0.108, 0.1373, 0.1715, 0.2109, 0.256, 0.3071, 0.3645, 0.4287, 0.5, 0.5713, 0.6355, 0.6929, 0.744, 0.7891, 0.8285, 0.8627, 0.892, 0.9168, 0.9375, 0.9544, 0.968, 0.9786, 0.9865, 0.9922, 0.996, 0.9983, 0.9995, 0.9999, 1)', fill: 'both' });import { easeInOutCubic } from '../../core/motion/curves.js';
import { curveToLinear } from '../../core/motion/springs.js';
const easing = curveToLinear(easeInOutCubic, { tolerance: 0.002 }); // the linear() string above
const x = easeInOutCubic(u); // per-frame code, u in 0..1When to use it, and when to avoid it
Use it for
- Moves between two resting positions: camera pushes, slides and loops.
- For cubic: general UI and card moves between 200 and 500 ms.
Avoid it for
- Quick UI feedback under 200 ms: the slow start delays the response.
- For cubic: long travel across the frame: the stop is abrupt for the distance.
The nearest vawe ease
The closest of the nine vawe After Effects eases is settle, an RMS gap of 0.014 in progress. After Effects and vawe set the shape with two handles, so it can be tuned where a named curve cannot.