Hook
useReducedMotion
Reads the user preference for reduced motion.
Hook
08
Import
import { useReducedMotion } from "@swirski/ui";Preview
useReducedMotion
PreviewMotion preference
Usage
const reducedMotion = useReducedMotion();Props
| Prop | Type | Default | Notes |
|---|---|---|---|
initialValue | boolean | false | Initial value before the media query runs. |
Returns
| Value | Type | Notes |
|---|---|---|
reducedMotion | boolean | True when prefers-reduced-motion is reduce. |