Respecting prefers-reduced-motion in React animations

November 14, 2026 · 6 min read

Animation makes interfaces feel alive, but for some people it makes them feel ill. Large movement, parallax and zooming effects can trigger dizziness, nausea or headaches for people with vestibular disorders, and they can simply be distracting for people with attention difficulties. Operating systems offer a setting for this, and as a developer it takes very little work to respect it.

What the setting actually means

On macOS and iOS it is called Reduce Motion, on Windows it is Show animations in Windows, and on Android it is Remove animations. When it is on, browsers report it through the prefers-reduced-motion media query. It does not mean "no animation at all". It means "avoid motion that could cause discomfort".

Keep, reduce, remove

  • Keep opacity fades and colour changes. They do not move anything across the screen and are generally safe.
  • Reduce small movements to nothing or to a quick, short fade. A button that bounces becomes a button that simply changes state.
  • Remove large travel, parallax, spinning, zooming and anything that loops forever, such as an auto-playing background animation.

A useful test is to ask whether the animation carries information. A checkbox that draws its tick tells you that something happened, and the same information can be given with an instant change. Decoration can go entirely.

In CSS

For plain CSS animations and transitions, wrap the motion in a media query, or turn it off inside one:

styles.css
.card {
  transition: transform 300ms ease, opacity 300ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: opacity 150ms ease;
    transform: none;
  }
}

In Motion for React

Motion gives you two tools. The first is a hook that returns true when the user has asked for reduced motion, which you can use to switch off specific effects:

hook.tsx
import { motion, useReducedMotion } from "motion/react"

export function Card() {
  const reduce = useReducedMotion()
  return (
    <motion.div
      initial={reduce ? false : { opacity: 0, y: 16 }}
      animate={{ opacity: 1, y: 0 }}
    />
  )
}

The second is MotionConfig, which applies a policy to everything inside it. With reducedMotion set to "user", Motion automatically disables transform and layout animations when the user prefers less motion, while keeping opacity and colour animations. Wrapping your app once covers most cases:

providers.tsx
import { MotionConfig } from "motion/react"

export function Providers({ children }: { children: React.ReactNode }) {
  return <MotionConfig reducedMotion="user">{children}</MotionConfig>
}

Looping and autoplaying animation

Anything that runs without the user asking for it deserves extra care. Marquees, floating backgrounds and autoplaying demos should stop when reduced motion is on, and long-running motion should have a visible pause control. This is also a rule in the Web Content Accessibility Guidelines: content that moves for more than five seconds needs a way to pause it.

How to test

You do not need to change your computer's settings. In Chrome DevTools, open the Command Menu, search for "Emulate CSS prefers-reduced-motion" and choose reduce. Reload the page and walk through every interaction. Anything that still flies across the screen needs attention.

Every component on makeui checks this setting and falls back to a calm version of the interaction, so you can use them without adding the handling yourself.

More guides