The useReducedMotion hook detects whether animations should be disabled based on the user's prefers-reduced-motion system setting and low-end device hardware (CPU cores, device memory). It returns a shouldAnimate flag that components use to automatically skip or simplify animations.
Used in components: Mask, ParticleFx, TiltFx, HoloFx, MatrixFx, WeatherFx, CelebrationFx, ShineFx
All effect components use this hook internally with a reducedMotion prop defaulting to 'auto'. You only need this hook directly when building custom animated components.
- Detects prefers-reduced-motion: reduce media query
- Detects low-end devices (≤2 CPU cores or ≤2GB memory)
- Reactive — updates when the user changes their system setting
- Override support: force animations on or off regardless of detection
- SSR-safe — returns safe defaults on the server
Use the hook to conditionally run animations:
Pass true to force reduced motion (disable animations), false to force full animations, or "auto" (default) to detect automatically.
The hook checks two signals to determine low-end devices:
- navigator.hardwareConcurrency — number of CPU cores (≤2 = low-end)
- navigator.deviceMemory — device memory in GB (≤2 = low-end, Chrome/Edge only)
These checks run once on mount and do not change during the session.