Skip to content
party.js logoparty.js logo

ReferenceEffectsType

ReducedMotion

What an effect does when the user prefers reduced motion.

type ReducedMotion = "skip" | "play";

What an effect does when the user has asked their system for reduced motion, through the prefers-reduced-motion media query:

  • "skip": the effect doesn’t play and draws nothing. The finished promise on the effect handle will still resolve as “completed”.
  • "play": the effect plays as usual.

The user’s preference is read once, when the effect starts. Changing it while an effect is running doesn’t affect that effect.

Particle effects are usually decoration, so party.js skips them by default. Only use "play" when the particles carry information the user would otherwise miss, or when the user has explicitly asked to see them, for example through a setting on your site.