Motion and Interaction · For leads · 5 min read
Motion, performance and budgets
For leads: motion costs frames, main-thread time and page weight, and users pay for it on their slowest phone. How motion relates to Core Web Vitals (INP and CLS), what a performance budget is, and how to write and enforce a motion budget a team can check.
An animation that stutters on a cheap phone tells people the product is broken, however good it looked on the designer's laptop. Motion isn't free: every frame has to be computed, every animation file has to be downloaded, and every busy moment delays the next tap. A lead can't review every animation. What they can do is agree on a budget, write it as limits anyone can check, and make the checks automatic.
What you'll be able to do after reading:
- Explain what motion costs, in terms a developer would use
- Connect motion to INP and CLS, two of Google's Core Web Vitals
- Write a motion budget as checkable limits
- Build the checks into the team's process
1. A budget a team can check
| Budget line | Limit | Why | How you check it |
|---|---|---|---|
| Responsiveness | INP of 200 ms or less, at the 75th percentile | The press state has to reach the next paint; a busy main thread delays it | Field data (Chrome UX Report, your RUM), web.dev thresholds |
| Stability | CLS of 0.1 or less, at the 75th percentile | Animating top or height moves the layout; transform doesn't | Field data and Lighthouse |
| Properties | transform and opacity only, unless the reason is written in the spec | They can run on the compositor; layout and paint properties drop frames | Code review; DevTools Performance panel |
| Duration | Under 150 ms for anything used dozens of times a day; 400 ms at most for transitions | Atlassian's ranges; long motion makes a fast product feel slow | Only tokens allowed; a lint rule for raw ms values |
| Focus | One focal animation at a time | Competing motion splits attention and costs frames | Critique |
| Weight | Example: 50 KB compressed per Lottie or Rive file, and its player counted in the JavaScript budget | Animation files and players are page weight like any image or script | Bundle size check in CI |
| Reduced motion | 100% of moving patterns have a fallback | WCAG 2.3.3 and 2.2.2; the people who need it most | The spec card field is required; quarterly audit |
A performance budget is "a set of limits imposed on metrics that affect site performance" (web.dev, Performance budgets 101). The article describes three kinds: limits on quantities, like file sizes; limits on timings, measured in the browser; and limits on scores from tools like Lighthouse. A motion budget uses all three. The figure is one, written for a product team.
2. What motion costs
To show a frame, the browser may have to work out the layout, paint the pixels and composite the layers. Animating transform and opacity can skip the first two; animating width, top or a shadow can't. The web.dev guide is direct: "restrict animations to opacity and transform to keep animations on the compositing stage" and "avoid any property that triggers layout or paint unless it's absolutely necessary" (web.dev, How to create high-performance CSS animations).
The same guide measures smoothness by dropped frames. In its example, moving a box with top and left dropped 50% of the frames; moving it with transform dropped 1%. That difference is invisible on a fast laptop and obvious on an old phone.
The rest of the cost is weight. A Lottie or Rive file, and the player that runs it, are downloaded like any image or script (see Lottie, Rive and handing off motion). Count them in the page's budget.
3. Motion and Core Web Vitals
Two of Google's Core Web Vitals touch motion directly:
- Interaction to Next Paint (INP) measures how long the page takes to respond to clicks, taps and key presses, from the interaction until the browser can paint the next frame. 200 ms or less is good; over 500 ms is poor; sites are judged at the 75th percentile of page loads (web.dev, INP). INP doesn't measure your animation's duration. It measures how long people wait before anything changes, so the first frame of the press state counts. Heavy script running on a tap delays it.
- Cumulative Layout Shift (CLS) measures unexpected movement of the layout. 0.1 or less is good; over 0.25 is poor. The CLS article says it plainly: the "transform property lets you animate elements without triggering layout shifts", so use
transform: scale()instead of changingheightandwidth, andtranslate()instead oftoporleft(web.dev, CLS).
So the two rules that keep animations smooth, transform and opacity and an immediate first frame, are also the rules that keep these metrics healthy. Designers and developers can argue for the same thing with the same numbers.
4. Write the budget
Start from the figure and adjust:
- Take the published thresholds as they are. INP 200 ms and CLS 0.1 at the 75th percentile are Google's; don't invent your own.
- Set the motion rules from your system. Durations from tokens, frequent feedback under 150 ms, transitions up to 400 ms, as in Atlassian's ranges (Atlassian, Motion). Properties limited to
transformandopacity. - Set weight limits from your own pages. Measure what animation files you ship today, and set a limit you can keep. The 50 KB in the figure is an example, not a standard.
- Write one line on reduced motion. Every moving pattern has a fallback (see Designing a reduced-motion version).
5. Make the checks automatic
A budget nobody checks is a wish. The performance budgets article suggests building checks into the build, with tools such as Lighthouse CI, and watching real-user data after launch (web.dev, Performance budgets 101). For motion:
- A lint rule that rejects raw
msandcubic-bezier()values outside the token file. - A bundle size check in CI for animation files and players.
- Field data for INP and CLS on the pages with the most motion.
- A slow phone on the team's desk. Every new pattern is seen on it before it's accepted (see Motion in design system governance).
- Critique for what tools can't see: one focal point, purpose, feel (see Reviewing motion in critique).
Lara Hogan's Designing for Performance makes the case that speed is part of design, not only engineering. Motion is where that's easiest to see.
6. Common mistakes
- Reviewing motion only on fast laptops and new phones.
- Treating performance as engineering's problem, after the design is approved.
- Animating
height,widthortopbecause it was easier to build. - Heavy work on the main thread when someone taps, so the press state arrives late.
- Animation files and players left out of the page weight.
- A budget with invented thresholds, instead of the published ones.
7. Try it (no tools needed)
- Pick the animation in your product you're proudest of.
- Write down which properties it animates and how heavy it is.
- Check it against the budget in the figure. Which line does it break?
Reflection questions: What's the slowest device your users actually have? Has anyone on the team ever used your product on it?
Checklist
Learn more
- web.dev: Performance budgets 101 · Interaction to Next Paint (INP) · Cumulative Layout Shift (CLS) · How to create high-performance CSS animations
- Atlassian Design System, Motion: the "performant" principle and duration ranges
Books, courses and videos to go deeper
- Designing for PerformanceLara HoganBook · O'Reilly, 2014 (Amazon)
- Designing Interface AnimationVal HeadBook · Rosenfeld Media, 2016 (Amazon)
Book links go to Amazon. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.
Related
Motion performance · Motion in design system governance · Reviewing motion in critique · Lottie, Rive and handing off motion · Motion tokens · Animation performance checklist