Files
web/src/lib/reduced-motion.ts

5 lines
175 B
TypeScript

export function prefersReducedMotion(): boolean {
if (typeof window === "undefined") return false;
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
}