Skip to content

usePreferredReducedMotion

Hook that returns the reduced motion preference

user
low
test coverage
Last changed: 7 months ago

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

SourceDemo

Contributors

D
debabin
debabin

Released under the MIT License.