Back to Content

PreferenceManager: reducedMotion property

files/en-us/web/api/preferencemanager/reducedmotion/index.md

latest1.0 KB
Original Source

{{APIRef("User Preferences API")}}{{SeeCompatTable}}{{SecureContext_Header}}

The reducedMotion read-only property of the {{domxref("PreferenceManager")}} interface returns the {{domxref("PreferenceObject")}} used to override the user's preference for the reduced motion of the site.

Valid reducedMotion {{domxref("PreferenceObject.value")}} settings are reduce and no-preference.

Value

A {{domxref("PreferenceObject")}} used to override the user's preference for the reduced motion of the site.

Examples

Basic usage

This example demonstrates how to query the user's reduced motion preference.

js
if (navigator.preferences.reducedMotion.value === "reduce") {
  // The user prefers reduced motion.
} else {
  // The user has stated no preference regarding motion.
}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}