useReducedMotion
Detect when to skip animations.
useReducedMotion returns true when animations should be skipped. Use it in
JavaScript-driven animation (e.g. with Motion) — for CSS,
the motion-safe/motion-reduce variants handle this automatically (see
Animation).
Usage
Return value
Returns a boolean — true when motion should be reduced. It's true if
either:
- the OS exposes
prefers-reduced-motion: reduce, or - a
ReducedMotionProviderancestor setdisableAnimations.
Works without a provider — it falls back to the OS preference alone. Add a ReducedMotionProvider only when you want
a way to force-disable motion beyond the system setting.