# Animations that cost frames

Investigation · Screens, navigation and motion · MO02

Finds animations that trigger expensive browser recalculations and stutter on phones or older laptops, backed by throttled performance recordings.

**Use it when:** Drawers, lists, scroll effects, or transitions look choppy on mobile devices or slower laptops.

## Prompt

```text
Find animations and transitions that trigger expensive layout or paint work per frame (animating width, height, top, left, margin, padding, heavy shadows or blurs, or driving styles from scroll/pointer events through React or component state). For the worst three candidates, record the interaction in a browser with CPU throttling enabled and report layout counts and dropped frames. Propose a cheaper alternative (such as transform or opacity) and note any visual tradeoff.

Treat this as a read-only investigation. Do not edit code, data, configuration, credentials or infrastructure. Report each finding with file:line or a command I can rerun, and a confidence.
Give me: Each expensive animation (file:line and animated property), plus throttled browser measurements (layout count and long frames) for the top three offenders before any code change.
Watch for: Code search flags every height transition, including tiny accordions that cost almost nothing. Measure before recommending a rewrite.
If this describes the project, say so and stop instead: Motion is limited to simple color, transform, or opacity transitions on small elements.
Start your report in plain English: what you found, what it means, and whether I need to do anything. Put files, lines and commands underneath.
```

**What it returns:** Each expensive animation (file:line and animated property), plus throttled browser measurements (layout count and long frames) for the top three offenders before any code change.

**Skip it when:** Motion is limited to simple color, transform, or opacity transitions on small elements.

**Tools:** Repository; the app running locally and a browser with performance tooling (DevTools or Playwright).

**Watch for:** Code search flags every height transition, including tiny accordions that cost almost nothing. Measure before recommending a rewrite.

**Changes:** Changes nothing

**Sessions:** Look first, then fix in a new session

## Skills

- [motion](https://www.atlasscope.dev/skills/motion): One command for interface motion on the web, in React, SwiftUI and React Native.

## Related

- [Animations that restart, block or never finish](https://www.atlasscope.dev/prompts/animations-that-restart-block-or-never-finish): Catches animations that look fine when clicked slowly and break under fast, impatient real-world clicking — restarting awkwardly, ignoring taps, or vanishing without exiting.
- [Slowest journeys, end to end](https://www.atlasscope.dev/prompts/slowest-journeys-end-to-end): Measures your five slowest user flows from button click to database reply and pinpoints which steps burn the most time.

Source: https://www.atlasscope.dev/prompts/animations-that-cost-frames
