Utility
useReducedMotion
Detect user's motion preference for accessibility-friendly animations.
import { useReducedMotion } from "saha-ui"Uses
Detects user's system preference for reduced motion using a media query.
Returns
| Name | Description |
|---|---|
| boolean | True if the user prefers reduced motion. |
Example
const reduceMotion = useReducedMotion();
if (reduceMotion) { disableAnimations(); }Notes
Small wrapper around useMediaQuery with the prefers-reduced-motion query.