Ada LindqvistDesign Engineer

Notes on Easing

For a long time I picked easing curves by feel. I would open the browser's curve editor, drag the handles around until something looked nice, and paste the numbers into the code. It worked, but every project ended up with a dozen slightly different curves and no reason behind any of them.

These days I use three curves for almost everything, and I can explain each one.

Things that enter: ease-out

When something appears on screen, it should arrive fast and settle slowly. That is ease-out. The fast start makes the interface feel like it answered you right away, and the slow end lets your eye catch where the thing landed.

--ease-out: cubic-bezier(0.23, 1, 0.32, 1);

This is stronger than the built-in ease-out keyword. The built-in one is so gentle that at 200ms it barely reads as eased at all. A steeper curve makes the start feel instant without making the motion longer.

Dropdowns, toasts, popovers and tooltips all use this.

Things that move on screen: ease-in-out

When something is already visible and moves from one place to another, like a sheet resizing or a tab indicator sliding, it should speed up and slow down. Starting at full speed looks like the element was shoved, and stopping at full speed looks like it hit a wall.

--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

Things that leave: often nothing

The curve I use least is ease-in. A curve that starts slow makes the interface feel like it is hesitating, and the person who closed a menu has already moved on. Most exits I make shorter than the entrance and give them the same ease-out curve, or skip the animation and just remove the element.

Duration matters more than the curve

The surprise for me was how little the exact curve mattered compared to duration. A perfect curve at 400ms still feels slow on a menu you open fifty times a day. My rough rule:

  • Under 150ms for things that respond to a press, like a button scaling down
  • 150 to 250ms for small things that appear, like menus and tooltips
  • 250 to 400ms for large things that move, like sheets and dialogs

Anything longer than that needs a reason, and "it looks smooth" is usually not one.

Write them down once

The real win was putting these into variables and refusing to write a new cubic-bezier inline. When every animation in a product uses the same three curves, the whole thing starts to feel like it was made by one person, even when it wasn't.