Hooks

useReducedMotion

Publisher

cermuel

50 hooks published

More from this publisher

useReducedMotion

Detect the reduced-motion preference.

useReducedMotion.tsx
import { useReducedMotion } from "@cermuel/hooks/react";export function useReducedMotionExample() {  const reduced = useReducedMotion();  return <p>{reduced ? "Reduced" : "Animated"}</p>;}

Props

Param
Type
Default Value

No props for this hook

Returns

boolean