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

NameDescription
booleanTrue if the user prefers reduced motion.

Example

const reduceMotion = useReducedMotion();
if (reduceMotion) { disableAnimations(); }

Notes

Small wrapper around useMediaQuery with the prefers-reduced-motion query.
Saha UI - The Modern React Component Library