My account

Motion design

Motion in a product is not decoration. Good motion has a job, like showing where something came from, confirming an action, or keeping people oriented while the screen changes. It is short (most UI motion is between 100 and 400 ms), it uses the right easing (ease out for things that enter, ease in for things that leave), it respects people who turn motion off, and it only animates properties the browser can animate cheaply. A senior designer specifies motion as clearly as colour and spacing.

Not reviewedWritten with AI helpReading time: 15 minOnline shop exampleEasingReduced motion

Author: bezzad

Contents

The problem: the animation everyone loved in the demo

For a new campaign, our online shop added a fun animation. When you press “Add to cart”, the product picture flies across the screen in a big curve, bounces twice on the cart icon, and the cart shakes. It takes 1.2 seconds. In the design review, everybody smiled.

After two weeks:

  1. Customers who add many items wait 1.2 seconds every time, and some press the button twice because they think the first press did not work.
  2. On cheap phones the animation stutters, because it changes the size and position of the picture in a way that makes the browser redo the layout.
  3. A customer with a vestibular disorder writes that the flying and shaking makes them dizzy.
  4. In the next sprint, a second team copies the idea with other timings, so the shop now has three different “fly” animations.

The idea was not bad: showing that the product went into the cart is useful. The motion had no clear job, no limits, and no spec.

Motion needs a job

Before you add motion, say its job in one sentence. If you cannot, do not add it.

  1. Feedback: confirm that an action worked. A button press state, a small check mark after “Save”.
  2. Orientation: show where something came from or where it went. A sheet slides up from the bottom, so the person knows it will close downwards.
  3. Relationship: show that two things are connected. A product card grows into the product page.
  4. Attention: point to one important change, for example a new error message. Use this rarely, or it becomes noise.
  5. Patience: make waiting feel shorter and show progress. A skeleton screen instead of a blank page.

Motion is not for making a page look “alive” all the time. Constant movement pulls the eye away from the task.

Duration: short and in proportion

The 1.2 s add-to-cart flight would be twice as wide as this whole chart.Button state, toggle100–150Tooltip, small fade150–200Dropdown, toast, card200–300Sheet, page change300–5000100200300400500600milliseconds
Small changes are fast, big movements are a bit slower. Most UI motion sits between 100 and 400 ms. Anything longer must have a strong reason.
  1. Small and close: a button state, a toggle, a tooltip appearing. About 100 to 150 ms.
  2. Medium: a dropdown opening, a toast sliding in, a card expanding. About 200 to 300 ms.
  3. Large or far: a full-screen sheet, a page transition. About 300 to 500 ms.
  4. Exits are faster than entries. When something leaves, the person is already done with it.
  5. Never block the person. The next action must be possible while the animation runs. For our cart, the button works again at once, and the counter updates at once.
  6. Repeated actions need less motion. Something the customer does 20 times a day must be very quick, or have no motion at all.

These numbers are common guidelines from design systems like Material Design, not physics laws. Test them on real devices.

Easing: how speed changes over time

Lineartime →progress barEase outtime →things that enterEase intime →things that leaveEase in-outtime →moving on screen
Linear motion looks mechanical. Ease out starts fast and slows down, good for things that enter. Ease in starts slow and speeds up, good for things that leave. Ease in-out is for things that move from one place to another on screen.
  1. Ease out (fast start, soft stop) for elements that enter: the person sees them quickly, and they “land” gently.
  2. Ease in (slow start, fast end) for elements that leave the screen.
  3. Ease in-out for elements that move from one place to another and stay on screen.
  4. Linear only for things like a progress bar or a spinner, where steady speed is the message.
  5. Springs and bounces feel playful. Use them rarely and small. A bounce on a payment button does not fit a serious moment.
  6. Put the curves in the design system as tokens, for example “easing standard”, “easing enter”, “easing exit”, next to “duration short”, “duration medium”. Then the design and the code use the same values.

Reduced motion: respect the setting

Some people get dizzy, sick or distracted by motion. Phones and computers have a setting to reduce it, and the browser tells the page with a media query.

.toast {
  transition: transform 250ms var(--ease-enter),
    opacity 250ms var(--ease-enter);
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    /* No sliding. A quick fade is usually fine. */
    transition: opacity 150ms linear;
  }
}
  1. Reduce, do not remove meaning. Replace big movement, zoom and parallax with a short fade. The person still needs to see that something changed.
  2. No motion that starts by itself and lasts long. Carousels and background videos need a pause button. WCAG asks for a way to pause moving content that starts automatically and lasts more than 5 seconds.
  3. No flashing more than three times per second. It can cause seizures.

Performance: animate cheap properties

  1. Animate transform and opacity. Browsers can usually animate them on the compositor without redoing layout, so they stay smooth even on weak phones.
  2. Avoid animating width, height, top, left, margin. These make the browser recalculate layout on every frame. Our flying picture stuttered for this reason.
  3. Aim for 60 frames per second, which means about 16 ms per frame. Test on a cheap phone, not only on a designer’s laptop.
  4. Fewer things at once. Ten elements moving together are harder to follow and heavier to draw.

Specifying motion

An engineer cannot build motion from a still picture, and a video alone does not give the numbers. A good motion spec says:

  1. Trigger: what starts it (press, page load, data arrives).
  2. What moves: the element and the properties (opacity, position, scale).
  3. From and to: the start and end values.
  4. Duration and easing: as tokens, for example “duration medium, easing enter”.
  5. Delay and order: if several things move, which first, and the gap between them.
  6. Reduced motion version: what happens when the setting is on.
  7. Interruption: what happens if the person acts again before it ends.

A short prototype or video next to the spec helps everyone feel it. The spec makes it buildable.

The fixed add-to-cart animation

  1. The button shows a short pressed state (100 ms) and a check mark (“Added”) for about 1.5 seconds.
  2. The cart counter changes at once, with a small scale pulse (200 ms, ease out) using transform.
  3. No flying picture and no shaking. With reduced motion on, the counter changes with no pulse.
  4. Duration and easing come from the design system tokens, so every team uses the same motion.

Common mistakes

Mistake Result Better way
Motion with no job Distraction, slower tasks. Say the job in one sentence, or remove it.
Long animations on frequent actions People wait or press twice. 100 to 300 ms, never blocking.
Linear easing everywhere Mechanical, stiff feeling. Ease out to enter, ease in to leave.
Ignoring reduced motion Dizziness and sickness for some people. A calm version for prefers-reduced-motion.
Animating width, top, left Stutter on weak phones. Transform and opacity.
Every team picks its own timing Inconsistent product. Duration and easing tokens in the system.

Summary in 6 lines

  1. Every motion has a job: feedback, orientation, relationship, attention or patience.
  2. Keep it short: about 100 to 400 ms, exits faster than entries, and never block the person.
  3. Ease out to enter, ease in to leave, ease in-out to move. Bounces rarely.
  4. Respect prefers-reduced-motion, let people pause moving content, and never flash.
  5. Animate transform and opacity, and test on a cheap phone.
  6. Specify trigger, values, duration, easing, order and the reduced version, using tokens.

Done reading this lesson?Mark it as finished so it shows in your lessons list and report card.