useReducedMotion
React Hook that tracks motion preference
Usage
Live Editor
function Demo() { const motion = useReducedMotion(false); return <div>ReducedMotion: {JSON.stringify(motion)}</div>; };
Result
Loading...
API
useReducedMotion
Returns
boolean
: whether prefer reduced motion
Arguments
Argument | Description | Type | DefaultValue |
---|---|---|---|
defaultState | default value | boolean | undefined | - |