useReducedMotion
Tracks the operating system setting (prefers-reduced-motion: reduce) and returns a boolean value to adapt motion and animations for accessibility.
Importing
1
import { useReducedMotion } from '@infinityfx/lively/hooks';Usage
Call signature
1
const prefersReducedMotion = useReducedMotion()
Returns
prefersReducedMotion:
boolean True if the user has requested reduced motion, false otherwise.