vaweGitHub

EasingCSS keywords

CSS ease-in-out

The CSS ease-in-out keyword: slow at both ends, fast in the middle.

ease-in-out reaches 50% of its travel at 50% of the time and 90% at 78%. Its peak speed is 1.72x the average.

CSS keywordspeak 1.72x

Progress against time0100.51progress50%90%
The dashed line is linear. The dots mark 50% and 90% of the travel.
Velocity, in multiples of average speed0100.51speed, x average
The dashed line is 1x, the speed of linear.

Live demo

The blue box uses the exact linear() string below, in your browser. The grey box is linear.

ease-in-out
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
78%of the time
After 10% of time
1.97%of the travel is done
Peak speed
1.72xtimes the average
Overshoot
0%stays inside the end
Undershoot
0%never below the start
linear() points
41at a 0.002 tolerance
cubic-bezier
exactworst gap 0.0 points

Copy the code

css linear() (exact)
animation-timing-function: linear(0, 0.0012, 0.0048, 0.011, 0.0197, 0.0311, 0.0452, 0.0621, 0.0817, 0.104, 0.1292, 0.157, 0.1874, 0.2203, 0.2555, 0.2928, 0.3319, 0.3725, 0.4143, 0.457, 0.5, 0.543, 0.5857, 0.6275, 0.6681, 0.7072, 0.7445, 0.7797, 0.8126, 0.843, 0.8708, 0.896, 0.9183, 0.9379, 0.9548, 0.9689, 0.9803, 0.989, 0.9952, 0.9988, 1);
cubic-bezier (the keyword's definition)
animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
web animations api
el.animate({ translate: ['0 0', '240px 0'] }, { duration: 600, easing: 'cubic-bezier(0.42, 0, 0.58, 1)', fill: 'both' });
css
animation: slide 600ms ease-in-out;

When to use it, and when to avoid it

Use it for

  • Moves between two resting positions: a slide, a camera push, a toggle.
  • Looping back-and-forth motion.

Avoid it for

  • Quick UI feedback: the slow start delays the response.
  • Film entrances. Land gives a clearer arrival.

The nearest vawe ease

The closest of the nine vawe After Effects eases is glide, an RMS gap of 0.0246 in progress. After Effects and vawe set the shape with two handles, so it can be tuned where a named curve cannot.