Design, UX & content

Motion design on websites without hurting speed

Keep website motion fast by animating only transform and opacity, which browsers can handle without recalculating layout, and by reserving space so animated elements never push content around. Respect the prefers-reduced-motion setting, give visitors a way to pause anything that moves for more than five seconds, and use CSS before reaching for heavy JavaScript animation libraries.

By Tcom Consultants · Updated · 4 min read · 5 sources

Agent network illustration for Motion design on websites without hurting speed

The short version

You can add motion to a website without hurting speed if you animate the right properties, keep layout stable, and load as little animation code as possible. Google's web.dev guide to high-performance animations recommends restricting animations to opacity and transform and avoiding any property that triggers layout or paint unless it is absolutely necessary. Add support for reduced motion settings and a pause control for anything long-running, and motion becomes a help instead of a cost.

Good motion has a job. It confirms a tap, shows where a panel came from, draws attention to a change, or makes waiting feel shorter. Motion that only decorates is the first thing to cut when a page feels slow.

Before adding any animation, write down what it is for and where it appears. A short list such as button feedback, menu open and close, and a fade between gallery images is easy to build, test and keep consistent. A vague brief to make the site feel alive usually ends with a dozen effects, each loading its own code.

Choose properties the browser can animate cheaply

Every frame of an animation has a cost. When you animate width, height, margin, top or left, the browser has to recalculate the layout of the page and repaint it, often many times a second. On a mid-range phone that shows up as stutter. Transform and opacity can usually be handled without redoing layout, so they stay smooth.

Effect you wantAvoid animatingAnimate this instead
Slide a panel inleft, right, margintransform: translate()
Grow or shrink a cardwidth, heighttransform: scale()
Fade content in or outvisibility with display changesopacity
Rotate an iconSwapping images each frametransform: rotate()
Highlight a buttonbox-shadow on large areasopacity on a pseudo-element layer

Use will-change sparingly

The will-change property tells the browser to prepare an element for animation. web.dev advises using it only if you encounter a performance issue, not early in your optimization process. Adding it to many elements uses extra memory and can make things slower. Apply it to the one element that needs it, and remove it after the animation if you add it with script.

Keep layout stable while things move

Motion that pushes content around damages your Core Web Vitals. The web.dev article on Cumulative Layout Shift says sites should aim for a score of 0.1 or less, and notes that the CSS transform property lets you animate elements without triggering layout shifts. Shifts within 500 milliseconds of a tap, click or keypress are excluded, so a menu that opens when clicked is fine. A banner that slides in on its own and shoves the article down is not.

Patterns that cause layout shift

  • Content that animates in from zero height after the page loads.
  • Cookie or promotion banners that push the page down instead of overlaying it.
  • Image carousels with no fixed height while the first slide loads.
  • Web fonts that load late and change the size of animated headings.

The fix is the same in each case: reserve the space before the animation starts. Set heights or aspect ratios on containers, overlay banners instead of inserting them, and preload the font your hero headline uses. Images are often the slowest part of an animated hero, so compress them first; our guide to image optimization and WebP shows how.

Respect motion preferences and accessibility

Some people get dizzy or nauseous from on-screen motion, and many turn on a reduce motion setting in their operating system. Browsers expose that choice through the prefers-reduced-motion media feature. When it is set, replace large movements with simple fades or instant changes. Keep the page fully usable; reduced motion should never hide content or break a menu.

What WCAG asks for

Two success criteria apply most often. The W3C's Pause, Stop, Hide criterion, at Level A, says moving, blinking or scrolling content that starts automatically, lasts more than five seconds and appears alongside other content needs a way to pause, stop or hide it. Animation from Interactions, at Level AAA, says motion triggered by interaction should be possible to turn off unless it is essential.

A simple reduced motion checklist

  1. Wrap large movements, parallax and auto-scrolling in a reduced motion check.
  2. Give carousels and background videos a visible pause button.
  3. Swap slide and zoom transitions for short fades when reduced motion is on.
  4. Test with the setting switched on in Windows, macOS, iOS and Android.

Pick tools that match the job

Most interface motion needs no library at all. CSS transitions and keyframe animations cover hover states, menus, fades and simple reveals. The View Transition API, supported in a growing number of browsers, handles smooth changes between page states and even between pages, as covered in our web design trends for 2026.

Reach for a JavaScript animation library only when you need timelines, physics or scroll-linked sequences that CSS cannot express. Load it only on the pages that use it, defer it so it does not block rendering, and measure Interaction to Next Paint before and after. Lottie files and video loops can look lighter than they are, so check their size. If a hero animation adds more weight than the rest of the page combined, it is costing you visitors.

Motion also interacts with themes. Transitions between light and dark should be quick and calm, as our guide to designing for dark mode explains. And motion supports words, not the other way round: clear button labels from our UX writing guide do more for usability than any animation.

How Tcom can help

We design and build sites with purposeful, lightweight motion that passes Core Web Vitals and respects accessibility settings. Learn about our website development service, browse our work, or read our answer on schema markup for small businesses for the structured side of a fast site. Contact us if your animated site feels slow.

Questions

Do animations hurt SEO?

Not by themselves. They can hurt Core Web Vitals if they delay the main content, cause layout shifts or block interaction, and those measures are part of page experience.

Is parallax scrolling still a good idea?

Use it lightly if at all. It is costly on phones and can trigger motion sickness, so turn it off when reduced motion is set and make sure the page reads well without it.

How long should a UI animation last?

Short enough that nobody waits for it. Most interface transitions feel right when they are brief, and anything that delays a visitor from reading or clicking should be cut back.

Should I use a video background on my home page?

Only if it earns its weight. Compress it heavily, provide a still image fallback, add a pause control, and avoid autoplaying it on mobile data where possible.

Sources

  1. How to create high-performance CSS animations web.dev (Google)
  2. Cumulative Layout Shift (CLS) web.dev (Google)
  3. prefers-reduced-motion MDN Web Docs
  4. Understanding Success Criterion 2.2.2: Pause, Stop, Hide W3C Web Accessibility Initiative
  5. Understanding Success Criterion 2.3.3: Animation from Interactions W3C Web Accessibility Initiative

Sources checked 23 November 2026.