Website animation and page speed: what affects INP, LCP and CLS
By Pulse Labs · Published · Updated · 4 min read
Animation slows a page only when it is done in the wrong way. Of the three Core Web Vitals, layout shift is the one animation most often breaks: moving elements by changing layout properties pushes content around and raises Cumulative Layout Shift. Moving them with transform and opacity does not. Interaction to Next Paint is hardly touched by scrolling or hovering, and Largest Contentful Paint suffers when the main content is hidden or faded in, because Chrome does not count an element at zero opacity.
This guide gives the thresholds from web.dev, a measurement we took that shows the layout-shift effect, and a checklist. It is about what the browser does, not about any one tool.
The three numbers
| Metric | Good | Poor | What animation can do to it |
|---|---|---|---|
| CLS, layout shift | 0.1 or less | above 0.25 | Raises it when an animation changes layout properties and content moves |
| LCP, main content painted | 2.5 s or less | above 4.0 s | Delays it if the hero is hidden until a script runs, which adds element render delay |
| INP, responsiveness | 200 ms or less | above 500 ms | Only through busy main-thread work during clicks, taps and key presses. web.dev says it does not measure scrolling, hovering or zooming |
LCP: do not fade in the main element
Shopify's developer documentation on not hiding the LCP image behind animations says Chrome does not treat elements at opacity: 0 as LCP candidates, so the paint is recorded only when the element becomes visible. Its example is an image that finishes downloading at 2 seconds but is faded in by JavaScript at 6 seconds, so LCP is 6 seconds. It reports hero opacity animations wasting 650 to 900 ms, and says a gap of more than 500 ms between the image finishing and LCP suggests something is delaying paint. We have not reproduced those figures; they are Shopify's, from its own case studies. Its fixes: no opacity transitions on the hero, use CSS keyframes (they start on first render) under 0.3 seconds if you must animate it, and exempt the first section.
CLS: a test of animating layout or transform
We built a page with a hero and 40 cards that reveal as they enter, using the same IntersectionObserver and the same half-second fade. One version moves each card by animating margin-top from 40 px to 0. The other moves it with transform: translateY(40px) to none. We scrolled the page top to bottom in 40 px steps, collected layout shifts with a PerformanceObserver, and read layout counts and time from Chrome's performance metrics. Chrome 158, Apple M1 Pro, 22 November 2026, five runs each.
| Reveal animates | CLS | Layout passes | Time in layout |
|---|---|---|---|
margin-top (a layout property) | 0.15 to 0.16 | 191 to 215 | 22.6 to 26.0 ms |
transform and opacity | 0 | 32 to 39 | 2.8 to 3.5 ms |
The layout version scored above web.dev's 0.1 threshold for a good CLS from one scroll through a single page, and it made about six times as many layout passes and spent about seven times as long in layout. The transform version scored zero. The result matches what web.dev's animations guide says: transform and opacity are the cheap properties, and top and left trigger layout.
A checklist
- Animate
transformandopacityonly, where you can. - Never fade in or hide the main hero element, and never hide above-the-fold content waiting for a script. Add hiding classes from script, and only below the fold.
- Load animation scripts
asyncso they never block the page. - Give pictures and embeds dimensions so nothing jumps when they load, animated or not.
- Stop continuous animation when people are not looking at it, and offer a still version for reduced motion.
- Measure on a mid-range phone, not only your laptop.
What MotionLift's script costs
The script is one file of about 28 KB compressed, with no libraries, loaded with async so it never blocks your page. On a test page of 12,000 elements, scrolling stayed at 60 frames a second and within three milliseconds of the page without it, on a processor slowed four times. If a device cannot keep up, the drawing stops first and then every effect, and that visit gets your plain page. If an effect ever added sideways scrolling, the script switches itself off. These are our own tests; measure your own site with and without it, and use the Studio's original-beside-motion view to compare.
For more on what to leave still, see motion design for websites.