Skip to content
party.js logoparty.js logo

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.

modeReducedMotion

What effects started afterwards do when the user prefers reduced motion.

setDefaultReducedMotion("play");
// This will produce confetti regardless of whether reduced motion is enabled
confetti(button);