Skip to main content

useReduceMotion

Used within animated components to respect a user's accessibility preferences.

Submit feedback
github
import { useReduceMotion } from '@uhg-abyss/mobile';

Usage

The useReduceMotion hook is a custom hook designed to determine whether the user has enabled the "Reduce Motion" accessibility setting on their device. This setting is often used by individuals who prefer to minimize animations and motion effects for accessibility or comfort reasons.

The hook returns an object {reducedMotionEnabled} with the boolean value:

  • true: "Reduce Motion" is enabled.
  • false: "Reduce Motion" is disabled.

When reduce motion is enabled, this hook can be used to adjust animation behavior.

Enabling Reduce Motion by Device

iOS

  • Open the Settings app
  • Select Accessibility
  • Choose Motion
  • Toggle the switch next to Reduce Motion to on

Android

  • Open the Settings app
  • Select Accessibility
  • Depending on your Android version, look for Remove Animations (or similar)

Windows

  • Open Settings
  • Select Accessibility
  • Go to Visual Effects
  • Toggle Animation Effects to off

Mac OS

  • Open System Settings
  • Select Accessibility
  • Choose Display
  • Toggle Reduce Motion to on

Additional Notes

Table of Contents