Skip to content

usePreferredReducedMotion ​

Hook that returns the reduced motion preference

browser
test coverage
Last changed: last month

Installation ​

Library
CLI
Manual
typescript
import { usePreferredReducedMotion } from '@siberiacancode/reactuse';

Usage ​

typescript
const reduced = usePreferredReducedMotion();

Demo ​

Api ​

Returns

UsePreferredReducedMotionReturn

Type declaration ​

typescript
export type UsePreferredReducedMotionReturn = 'no-preference' | 'reduce';

Source ​

Source • Demo

Contributors ​

D
debabin
debabin

Released under the MIT License.