December 4, 2026
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.
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?
| Effect | Under reduced motion |
|---|---|
| Parallax, scroll-driven movement | Turn 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 tickers | Stop them and show the content as a still row. |
| Autoplay carousels and sliders | Stop autoplay. Keep the buttons. |
| Page transitions, zooms, wipes | Replace with a quick cross-fade. |
| Custom cursors, magnetic buttons, tilt cards | Remove the movement. Keep hover colours. |
| Background video and animated backgrounds | Show a still frame. |
| Count-up numbers, text scramble | Show the final value at once. |
| Button colour change, focus ring, small fades | Keep them. |
| Loading spinner | Keep it, or use a pulsing dot. People need to know something is happening. |
What are the common mistakes?
- The blanket reset. A rule that sets every animation and transition to almost zero is a quick fix, but it can break scripts that wait for an animation to end, and it removes helpful fades too. Use it as a safety net, not as the plan.
- Hidden content. If elements start at
opacity: 0and only appear when an animation runs, turning the animation off leaves them invisible. Make the visible state the default. - Only checking CSS. Motion driven from JavaScript, canvas or WebGL ignores your media query. Check
matchMediathere too.
How do I test it?
- Open Chrome DevTools and press Ctrl + Shift + P (Cmd on a Mac).
- Type Rendering and choose Show Rendering.
- Find Emulate CSS media feature prefers-reduced-motion and choose reduce.
- 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
- Scroll animations without a library.
- Parallax scrolling without a library.
- How to make an infinite marquee in pure CSS.
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.