prefersReducedMotion
Whether the user asked the system to reduce motion (prefers-reduced-motion: reduce).
Outside a browser, it returns false. To react to changes, use
watchMedia('(prefers-reduced-motion: reduce)', listener).
Available since v3.1.5
Import
Section titled “Import”Signature
Section titled “Signature”Returns
Section titled “Returns”boolean — true if animations should be reduced or removed
Examples
Section titled “Examples”Skip an animation
Section titled “Skip an animation”Use a zero duration when the user asked to reduce motion.
React to changes
Section titled “React to changes”Combine with watchMedia to follow the setting while the page is open.
