ReferenceEffectsFunction
setDefaultReducedMotion()
Sets the default way of handling reduced motion.
function setDefaultReducedMotion(mode: ReducedMotion): void;Sets what effects do by default when the user has asked their system for reduced motion. Effects can override
this behavior with their reducedMotion option. Useful when your site has its own motion setting that should
take precedence.
Parameters
Section titled “Parameters”modeReducedMotionWhat effects started afterwards do when the user prefers reduced motion.
Example
Section titled “Example”setDefaultReducedMotion("play");// This will produce confetti regardless of whether reduced motion is enabledconfetti(button);