Copied!
Guide

prefers-reduced-motion: what to do with your animations

Some visitors ask their device for less motion because movement on screen makes them ill. Respecting that takes one media query. Here is what to remove, what to keep, and how to test it.

← Blog
Title card: Reduced motion. A lime card shows @media and prefers-reduced-motion: reduce.

December 4, 2026

3 min readCSS, JavaScript and testing

prefers-reduced-motion tells your page that the visitor has asked their device for less animation. When it is set, remove large movement such as parallax, zooms and slides across the screen, replace it with a short fade or nothing, and keep all content visible. It takes one media query in CSS and one line in JavaScript.

Try it on any site. The free animation library checker shows you which animation libraries actually run on a page (GSAP, Lenis, Framer Motion). Paste a URL, no sign-up for your first lookup.

Who needs it?

People with vestibular disorders can get dizzy, nauseous or get a headache from movement on screen, in the same way some people get carsick. Others turn it on because they find motion distracting, or to save battery. You cannot tell who they are, and they should not have to ask you.

How do I check it in CSS?

.card { transition: transform 0.4s ease, opacity 0.4s ease; }
.card.is-in { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .card { transform: none; transition: opacity 0.2s ease; }   /* fade only */
}

You can also write it the other way round and only add motion for people who have not asked for less:

@media (prefers-reduced-motion: no-preference) {
  .hero-title { animation: rise 0.8s both; }
}

The second form is the safer habit. Motion becomes something you add, so a forgotten rule leaves a still page instead of an unwanted animation.

How do I check it in JavaScript?

const calm = matchMedia("(prefers-reduced-motion: reduce)");

if (!calm.matches) startParallax();

// the setting can change while the page is open
calm.addEventListener("change", () => {
  calm.matches ? stopParallax() : startParallax();
});

What should I do with each kind of effect?

EffectUnder reduced motion
Parallax, scroll-driven movementTurn it off. Leave layers in their final place.
Reveal on scroll (slide or rise)Show the content at once, or use a short fade.
Marquees and tickersStop them and show the content as a still row.
Autoplay carousels and slidersStop autoplay. Keep the buttons.
Page transitions, zooms, wipesReplace with a quick cross-fade.
Custom cursors, magnetic buttons, tilt cardsRemove the movement. Keep hover colours.
Background video and animated backgroundsShow a still frame.
Count-up numbers, text scrambleShow the final value at once.
Button colour change, focus ring, small fadesKeep them.
Loading spinnerKeep it, or use a pulsing dot. People need to know something is happening.

What are the common mistakes?

How do I test it?

  1. Open Chrome DevTools and press Ctrl + Shift + P (Cmd on a Mac).
  2. Type Rendering and choose Show Rendering.
  3. Find Emulate CSS media feature prefers-reduced-motion and choose reduce.
  4. Reload and scroll the whole page. Nothing should slide, zoom or spin, and nothing should be missing.

Where can I see it done?

Every one of the 175 elements in the free Enrichr Library has an accessibility note that says what it does when reduced motion is set. For example, the Marquee ticker, Split text reveal and Layered parallax scene each handle it in their own code, which you can copy.

Where to go next

FAQ

What is prefers-reduced-motion?

A CSS media feature that tells a page the visitor has asked their operating system to reduce animation. It is set in the accessibility settings of Windows, macOS, iOS and Android.

Should I turn off all animations for reduced motion?

No. The setting is about movement that can cause dizziness or nausea: parallax, large slides, zooms and spins. Gentle opacity fades and colour transitions are generally fine and still help people follow changes.

How do I test prefers-reduced-motion?

In Chrome DevTools, open the Rendering panel and set Emulate CSS media feature prefers-reduced-motion to reduce. You can also turn the setting on in your operating system.

Does prefers-reduced-motion stop videos and GIFs?

Not by itself. You have to handle them: do not autoplay background video when it is set, and show a still frame with a play button instead.