When building slide-out drawers and parallax effects, it's easy to forget that sharp, sweeping motion can cause real physical discomfort for users with vestibular sensitivities. Operating systems expose a prefers-reduced-motion setting, but killing animations outright isn't the answer either—elements start snapping abruptly across the screen.
The useReducedMotion() hook from motion/react reads that OS preference and lets you swap coordinate shifts for a gentle opacity fade:
import { motion, useReducedMotion } from "motion/react";
export function Sidebar({ isOpen }: { isOpen: boolean }) {
const shouldReduce = useReducedMotion();
return (
<motion.aside
animate={{ opacity: isOpen ? 1 : 0, x: isOpen ? 0 : shouldReduce ? 0 : "-100%" }}
transition={{ duration: shouldReduce ? 0.2 : 0.4 }}
/>
);
}
And if you want to apply the rule across your entire component tree, there's a global provider:
import { MotionConfig } from "motion/react";
export function AppRoot({ children }: { children: React.ReactNode }) {
return <MotionConfig reducedMotion="user">{children}</MotionConfig>;
}
Alongside recent advances like React 19.3 stabilizing the ViewTransition component and fragment refs, this pattern keeps transitions clear and legible without triggering motion sickness.

