Motion and Interaction · Step 2 · 8 min read
Easing curves
Easing is how motion speeds up and slows down, and it changes how an animation feels more than its duration does. How to read an easing curve, what the CSS keywords really are, which curve to use for things arriving, leaving and moving, and how to write easing so a developer builds what you meant.
Two animations with the same duration can feel completely different. The difference is easing: where the motion spends its time. Nothing in the world moves at one constant speed. A cup slides across a table, a door swings shut, a ball lands: everything speeds up from rest and slows into rest. Motion that ignores that looks mechanical, and motion that slows down at the end lets the eye land where the thing stops. Choosing the curve is one of the smallest decisions in interface design, and one of the most visible.
What you'll be able to do after reading:
- Read an easing curve and predict how the motion will feel
- Say what
ease,ease-in,ease-outandease-in-outreally are - Choose a curve for things arriving, leaving and moving across the screen
- Write easing in a spec as a value a developer can paste
1. Same time, different motion
- linear
linear - ease
cubic-bezier(0.25, 0.1, 0.25, 1) - ease-in
cubic-bezier(0.42, 0, 1, 1) - ease-out
cubic-bezier(0, 0, 0.58, 1) - ease-in-out
cubic-bezier(0.42, 0, 0.58, 1) - M3 emphasized decelerate
cubic-bezier(0.05, 0.7, 0.1, 1)
Run the race a few times and watch one lane at a time. All six dots start together and arrive together, at 800 ms. Linear keeps one speed and stops dead. Ease-in starts slow and arrives fast, as if it crashed into the end. Ease-out leaves fast and glides into place. The last lane, Material's emphasized decelerate curve, covers most of the distance almost at once and then takes its time settling.
NN/g is clear about the default: "completely linear motion looks weird and unnatural", and most of the time you want ease-out, which "makes the animation feel responsive, but allows the eye time to focus on the element as it comes to rest" (Page Laubheimer, Executing UX Animations, NN/g, 2020). It's the same idea Disney's animators called slow in and slow out (Motion principles for interfaces).
2. How to read a curve
cubic-bezier(0.2, 0, 0, 1): a short gentle start, a fast middle and a long, soft arrival.Diagram: Marcus Andrey, CC BY 4.0. Curve values: Material Design 3 motion tokens.An easing curve is a graph of progress over time. The bottom-left corner is the start, the top-right is the end, and both are fixed. What you change is the shape in between:
- Where the line is steep, the motion is fast. A lot of progress happens in a little time.
- Where it's flat, the motion is slow. Time passes and little changes.
- If the line goes above the top, the motion passes its target and comes back: an overshoot.
In CSS, most curves are cubic Bézier curves, written cubic-bezier(x1, y1, x2, y2): the four numbers are the two control points, P1 and P2, that bend the line. The x values are time and must stay between 0 and 1; the y values are progress and can go outside that range, which is how you get an overshoot, a "bouncing" effect (MDN, cubic-bezier()).
3. What the keywords really are
The CSS keywords are just named curves (MDN, easing-function):
| Keyword | The same as | How it feels |
|---|---|---|
linear |
cubic-bezier(0, 0, 1, 1) |
One speed, sudden start and stop |
ease |
cubic-bezier(0.25, 0.1, 0.25, 1) |
Like ease-in-out, but it speeds up more sharply at the start. The default for transitions |
ease-in |
cubic-bezier(0.42, 0, 1, 1) |
Starts slow, ends fast |
ease-out |
cubic-bezier(0, 0, 0.58, 1) |
Starts fast, slows into place |
ease-in-out |
cubic-bezier(0.42, 0, 0.58, 1) |
Slow, fast, slow |
These are fine starting points, but they're gentle. Design systems usually define their own, with a faster start and a longer, softer landing. Material Design 3's tokens, for example (Material Design 3, Easing and duration; values from the Material Web tokens):
| Token | Value |
|---|---|
standard |
cubic-bezier(0.2, 0, 0, 1) |
standard-decelerate |
cubic-bezier(0, 0, 0, 1) |
standard-accelerate |
cubic-bezier(0.3, 0, 1, 1) |
emphasized-decelerate |
cubic-bezier(0.05, 0.7, 0.1, 1) |
emphasized-accelerate |
cubic-bezier(0.3, 0, 0.8, 0.15) |
The names say the job. Decelerate curves are for things arriving: they slow into place. Accelerate curves are for things leaving: they speed away.
4. Which curve, when
| The motion | Curve | Why |
|---|---|---|
| Something arrives (a dialog, a menu, a toast) | Ease-out, decelerate | It's already moving when you see it, and it lands softly where the eye can find it |
| Something leaves | Ease-in, accelerate | It speeds away; you don't need to watch it go |
| Something moves from one place to another on screen (a reordered item, a toggle knob) | Ease-in-out, standard | It starts and stops on screen, so both ends are seen |
| Something tied to time or to a value (a progress bar, a timer, a spinning loader) | Linear | Here an even speed is the information |
| Colour and opacity changes | Ease-out, or simple ease |
The eye is less sensitive to the curve than in movement |
NN/g explains the arriving-and-leaving pair with a detail that confuses many people: ease-out is used for things that enter, and ease-in for things that leave. Ease-out on an entrance "allows the eye to predict where it will stop"; ease-in on an exit feels "like it's accelerating away" (Laubheimer, NN/g, 2020). The same article warns that ease-in on an entrance "can feel unresponsive", because the first moment after the click barely moves.
5. The code behind the race
Every lane in the race has the same duration and a different transition-timing-function. This is the real CSS:
.mo-a-race .mo-a-dot { transition-duration: 800ms; }
.mo-a-linear .mo-a-dot { transition-timing-function: linear; }
.mo-a-ease .mo-a-dot { transition-timing-function: ease; }
.mo-a-ease-in .mo-a-dot { transition-timing-function: ease-in; }
.mo-a-ease-out .mo-a-dot { transition-timing-function: ease-out; }
.mo-a-ease-in-out .mo-a-dot { transition-timing-function: ease-in-out; }
.mo-a-emph .mo-a-dot { transition-timing-function: cubic-bezier(0.05, 0.7, 0.1, 1); }
Easing doesn't change accessibility on its own: with reduced motion on, these dots stop moving, as in the last lesson. But a curve with a big overshoot makes a move larger than it needs to be, and that's worth keeping out of the reduced version.
6. Writing easing in a spec
NN/g calls easing "one of the most challenging aspects to communicate to an engineering team", because every platform writes it differently: cubic-bezier values in CSS, named curves on iOS and Android, percentages in After Effects (Laubheimer, NN/g, 2020). A video of the motion doesn't fix that: nobody can read a curve off a video.
So:
- Write the value, not a word.
cubic-bezier(0.2, 0, 0, 1), or a token name that maps to it, not "smooth". - Agree the format with your developers first. If they use named curves on Android, use the name.
- Keep the list short. Two or three curves for a whole product is plenty: one for arriving, one for leaving, one for moving.
- Put it with the duration. Easing without duration is half a spec. Lottie, Rive and handing off motion covers the full handoff.
7. Common mistakes
- Linear motion across the screen: it looks robotic.
- Ease-in on things that appear: the first frames barely move, and the interface feels slow.
- Using
easefor everything because it's the default. - A different custom curve on every component.
- Fixing slow motion with a "faster" curve when the duration is the problem.
- Handing over a video and expecting the developer to guess the curve.
8. Vocabulary
| Term | Meaning |
|---|---|
| Easing | How the speed of a motion changes from start to end |
| Easing curve | A graph of progress over time; steep means fast, flat means slow |
| Cubic Bézier | A curve set by two control points; in CSS, cubic-bezier(x1, y1, x2, y2) |
| Ease-out, decelerate | Fast start, slow end; for things arriving |
| Ease-in, accelerate | Slow start, fast end; for things leaving |
| Overshoot | Motion that passes its target and comes back |
9. Try it (no tools needed)
- Slide a cup across a table and stop it with your hand. Then push it and let it slow down on its own.
- Notice where each motion spends its time.
- Now open a menu in any app. Which of your two cups does it look like?
Reflection questions: Have you seen an interface where things start slow and then rush at the end? How did it feel to use?
10. If you already practise
- Reduce your product to three named curves, arrive, leave and move, and map every animation to one.
- Draw the curve in the spec next to its value. People understand the shape faster than the numbers.
- Check how your design tool's presets map to code. Ask a developer to paste the curve into the browser's DevTools, where it can be seen and edited live.
Checklist
Learn more
- Page Laubheimer, Executing UX Animations: Duration and Motion Characteristics (NN/g, 2020)
- MDN: easing-function · cubic-bezier() · transition-timing-function
- Material Design 3, Easing and duration · Material Web motion tokens
Books, courses and videos to go deeper
- Designing Interface AnimationVal HeadBook · Rosenfeld Media, 2016 (Amazon)
- Animation at WorkRachel NaborsBook · A Book Apart, 2017 (Amazon)
Book links go to Amazon. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.
Related
Duration: how long is right · Springs and physics · Motion tokens · CSS transitions and animations · Lottie, Rive and handing off motion · Easing selection guide