Toggle & reduced motion
The whole engine can be switched off at runtime. The preference is persisted to localStorage and survives reloads.
js
import { toggleAnimations,
enableReducedMotion,
disableReducedMotion } from 'gclass-anims'
toggleAnimations() // flips on/off, persists + reloads
enableReducedMotion() // hard override: animations OFF
disableReducedMotion() // clears the overridePrecedence
forcedReducedenableReducedMotion() wins over everythingstored choiceAn explicit toggle always beats the OS settingno choiceDefaults to ON unless prefers-reduced-motion: reducePer-element opt-out
While the OS requests reduced motion, any element carrying .reduced is left completely un-animated - its spawn, loop, click and scroll behaviours all skip. Elements without .reduced keep animating.
html
<div class="spawn-up">animates even under reduce-motion</div>
<div class="spawn-up reduced">skipped under reduce-motion</div>All three toggles reload the page after persisting so the running engine tears down cleanly.