← Writing
6 min read

Which easing curve to use, and when

Most UI animation problems are easing problems. A working guide to picking the right curve, and why ease-out does more heavy lifting than everything else combined.

  • easing
  • fundamentals

There is a moment, watching a lot of interface animation back to back, where you stop seeing individual transitions and start seeing the same handful of mistakes. The most common one is not timing, and it is not choreography. It is easing: specifically, using the wrong curve, or not thinking about the curve at all.

The good news is that easing is a small subject. There are maybe five decisions worth making, and once you have made them the rest is taste.

Linear is almost always wrong

linear means constant velocity: the element travels the same distance in the first 10% of the animation as in the last. Nothing in the physical world does this. Objects have mass, so they accelerate and decelerate. A linear move reads as mechanical because it is. It is the motion of a stepper motor, not of a thing being moved.

There are exactly two places linear belongs:

  • Continuous, looping motion with no start or end to perceive, like a spinner, a marquee or a progress bar filling at a genuinely constant rate. Any easing here creates a visible pulse each time the loop wraps.
  • Colour and opacity crossfades, sometimes, where there is no spatial movement for the eye to read as physical.

Everything that moves in space wants a curve.

Ease-out is the default, and it is not close

If you take one thing from this: most interface motion should be ease-out. Fast at the start, decelerating into place.

The reason is about attention rather than physics. An ease-out animation puts most of its movement in the first few frames, which means the element arrives at its destination early and spends the remainder settling. Perceptually the interface feels like it responded immediately. The eye gets the information at the front of the animation, and the tail is just polish.

Ease-in does the opposite. It creeps at the start and rushes at the end, which means the first third of the duration communicates nothing. That is why an ease-in entrance feels sluggish at an identical duration. The animation is the same length; the response is later.

So: things entering the screen, panels opening, dropdowns expanding, cards appearing, anything responding to a tap: ease-out.

Concretely, in ascending order of drama:

/* Gentle. Barely-there deceleration for small, frequent motion. */
transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);   /* easeOutCubic */

/* Punchy. Snaps out and settles. The workhorse for panels and sheets. */
transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);    /* easeOutExpo */

easeOutExpo is aggressive: the great majority of the distance is covered in the first fifth of the duration. That is exactly what makes it feel responsive, and also what makes it too much for a small hover state. Match the drama of the curve to the size of the movement.

You can compare these side by side in the easing gallery. The previews there run the actual curve, which is more useful than reading numbers.

Ease-in is for exits, and only exits

Ease-in (slow start, accelerating away) is the mirror image, and it has one legitimate job: things leaving the screen.

When an element exits, you do not need the user to track it. It is gone; its destination is irrelevant. Accelerating away reads as decisive and gets it out of the way quickly. The classic paired treatment is:

  • Enter with easeOutCubic, 200ms
  • Exit with easeInCubic, 150ms

Note the asymmetry. This is the second-most-useful idea in easing after “use ease-out.”

Exits should be faster than entrances

An entrance is informative: something new appeared and the user needs to perceive it, locate it, and understand where it came from. That is worth 200–300ms.

An exit is not informative. The user already decided to dismiss it. Every millisecond of a leaving animation is latency between their decision and the interface acknowledging it.

A good rule: exits run at 60–75% of the entrance duration. If a modal opens over 250ms, close it in around 175ms. Symmetric timing is the intuitive choice and it is wrong. It makes dismissal feel like the interface is reluctant.

Ease-in-out is for moving, not appearing

ease-in-out accelerates and then decelerates: the motion of something that starts at rest and ends at rest, having travelled between two known points. That is the giveaway for when to use it: both ends of the movement are on screen and the user can see both.

Good uses:

  • A card animating from one grid position to another
  • A tab indicator sliding between tabs
  • An accordion pushing content down
  • Anything shared-element, where a thing morphs from one place into another

Bad uses: anything entering or exiting. Ease-in-out on an entrance inherits ease-in’s sluggish first third for no benefit.

The safe default is cubic-bezier(0.65, 0, 0.35, 1) (easeInOutCubic). Watch the duration. Because in-out spends time accelerating and decelerating, it needs roughly 1.2× what the equivalent ease-out would, or it feels rushed through the middle.

Overshoot: use it deliberately or not at all

easeOutBack, cubic-bezier(0.34, 1.56, 0.64, 1), passes its destination and springs back. That 1.56 is the whole trick: a control point above 1 puts the curve outside the 0–1 range, so the element genuinely travels too far before returning.

Overshoot reads as playful, physical, and slightly toylike. That is a real register and sometimes exactly right: a like button, a success check, an element the user just directly manipulated. It is also the fastest way to make a serious interface feel unserious. A banking app where the balance card boings is a banking app people trust less.

Two practical constraints. Overshoot needs room. It will clip if the element sits against a container edge. And it needs duration: under about 300ms the overshoot is too fast to read as a spring and just looks like a glitch.

The one-screen version

Situation Curve Rough duration
Entering, appearing, expanding ease-out 200–300ms
Leaving, dismissing, collapsing ease-in 150–200ms
Moving between two visible points ease-in-out 250–350ms
Hover, focus, small state change ease-out, gentle 100–150ms
Playful confirmation, direct manipulation ease-out-back 300–400ms
Looping, continuous, indeterminate linear n/a

What this does not cover

Everything above is cubic-bezier easing: a curve defined by two control points, evaluated over a fixed duration. It is what CSS transitions give you and it covers the overwhelming majority of interface motion.

It cannot express two things. Elastic and bounce need multiple oscillations, which a single cubic-bezier has no way to describe. In CSS these need linear() with sampled points, or keyframes. And springs are a different model entirely: physically simulated from stiffness, damping and mass, with no fixed duration, which is why they respond so well to interruption. If a user can grab a thing mid-animation and throw it, you want a spring. If they cannot, a cubic-bezier is simpler and more predictable.

The curves in the easing gallery are all cubic-bezier, with an editor for dragging out your own. Start from easeOutCubic or easeOutExpo and adjust from there. Almost every good UI curve is a variation on one of those two.