Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

fix: start the demo after Back or reload, and grey out Loop and Slow motion under reduced motion

matinb474d2e36ae2
diff --git a/animations/02-entrance-and-exit/blur-in/index.html b/animations/02-entrance-and-exit/blur-in/index.html
index f2d19f09..0b8a7fcf 100644
--- a/animations/02-entrance-and-exit/blur-in/index.html
+++ b/animations/02-entrance-and-exit/blur-in/index.html
@@ -67,8 +67,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
@@ -119,7 +119,7 @@
<p class="hb-hint">Smooth slows at the end, like a lens settling.</p>
</div>
<div class="hb-setting" id="drift-setting">
- <label class="hb-switch-row"><span>Drifts up</span><input class="hb-switch" type="checkbox" role="switch" id="drift-tog" checked></label>
+ <label class="hb-switch-row"><span>Drifts up</span><input class="hb-switch" type="checkbox" role="switch" id="drift-tog" checked autocomplete="off"></label>
<p class="hb-hint">A small rise, as if it settles into place.</p>
</div>
</div>
diff --git a/animations/02-entrance-and-exit/bounce-in/index.html b/animations/02-entrance-and-exit/bounce-in/index.html
index 618550ba..4c4bdb2f 100644
--- a/animations/02-entrance-and-exit/bounce-in/index.html
+++ b/animations/02-entrance-and-exit/bounce-in/index.html
@@ -64,8 +64,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
@@ -107,7 +107,7 @@
<summary><span class="hb-more-label">More options</span><span class="hb-less">Fewer options</span><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></summary>
<div class="hb-settings">
<div class="hb-setting">
- <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked></label>
+ <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked autocomplete="off"></label>
<p class="hb-hint">Softens the first moment.</p>
</div>
</div>
diff --git a/animations/02-entrance-and-exit/clip-path-reveal/index.html b/animations/02-entrance-and-exit/clip-path-reveal/index.html
index 0bbaa8c7..2207796c 100644
--- a/animations/02-entrance-and-exit/clip-path-reveal/index.html
+++ b/animations/02-entrance-and-exit/clip-path-reveal/index.html
@@ -66,8 +66,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
diff --git a/animations/02-entrance-and-exit/curtain-reveal/index.html b/animations/02-entrance-and-exit/curtain-reveal/index.html
index cef0fa1b..bee6917c 100644
--- a/animations/02-entrance-and-exit/curtain-reveal/index.html
+++ b/animations/02-entrance-and-exit/curtain-reveal/index.html
@@ -69,8 +69,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
diff --git a/animations/02-entrance-and-exit/fade-in-out/index.html b/animations/02-entrance-and-exit/fade-in-out/index.html
index b650d7c8..c82fff1d 100644
--- a/animations/02-entrance-and-exit/fade-in-out/index.html
+++ b/animations/02-entrance-and-exit/fade-in-out/index.html
@@ -61,8 +61,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
diff --git a/animations/02-entrance-and-exit/flip-in/index.html b/animations/02-entrance-and-exit/flip-in/index.html
index a9776c49..ee8eff04 100644
--- a/animations/02-entrance-and-exit/flip-in/index.html
+++ b/animations/02-entrance-and-exit/flip-in/index.html
@@ -62,8 +62,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
@@ -134,7 +134,7 @@
<p class="hb-hint">Springy swings a little past, then settles.</p>
</div>
<div class="hb-setting">
- <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked></label>
+ <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked autocomplete="off"></label>
<p class="hb-hint">Softens the first moment.</p>
</div>
</div>
diff --git a/animations/02-entrance-and-exit/letter-by-letter-stagger/index.html b/animations/02-entrance-and-exit/letter-by-letter-stagger/index.html
index 1385cdac..71c77c6a 100644
--- a/animations/02-entrance-and-exit/letter-by-letter-stagger/index.html
+++ b/animations/02-entrance-and-exit/letter-by-letter-stagger/index.html
@@ -67,8 +67,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
@@ -119,12 +119,12 @@
<p class="hb-hint">How long each letter takes to settle.</p>
</div>
<div class="hb-setting" id="cursor-setting" hidden>
- <label class="hb-switch-row"><span>Blinking cursor</span><input class="hb-switch" type="checkbox" role="switch" id="cursor-tog" checked></label>
+ <label class="hb-switch-row"><span>Blinking cursor</span><input class="hb-switch" type="checkbox" role="switch" id="cursor-tog" checked autocomplete="off"></label>
<p class="hb-hint">A cursor leads the letters as they are typed.</p>
</div>
<div class="hb-setting">
<label class="hb-setting-name" for="txt-in">Your text</label>
- <input class="hb-text" type="text" id="txt-in" value="Hello, world." maxlength="60">
+ <input class="hb-text" type="text" id="txt-in" value="Hello, world." maxlength="60" autocomplete="off">
<p class="hb-hint">Short phrases work best, up to 60 characters.</p>
</div>
</div>
diff --git a/animations/02-entrance-and-exit/rotate-in/index.html b/animations/02-entrance-and-exit/rotate-in/index.html
index c8e34306..4734c1d5 100644
--- a/animations/02-entrance-and-exit/rotate-in/index.html
+++ b/animations/02-entrance-and-exit/rotate-in/index.html
@@ -62,8 +62,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
@@ -104,15 +104,15 @@
<p class="hb-hint">Which way it turns as it lands.</p>
</div>
<div class="hb-setting">
- <label class="hb-switch-row"><span>Bounce at the end</span><input class="hb-switch" type="checkbox" role="switch" id="bounce-tog" checked></label>
+ <label class="hb-switch-row"><span>Bounce at the end</span><input class="hb-switch" type="checkbox" role="switch" id="bounce-tog" checked autocomplete="off"></label>
<p class="hb-hint">Goes slightly too far, then settles.</p>
</div>
<div class="hb-setting">
- <label class="hb-switch-row"><span>Grows from small</span><input class="hb-switch" type="checkbox" role="switch" id="scale-tog" checked></label>
+ <label class="hb-switch-row"><span>Grows from small</span><input class="hb-switch" type="checkbox" role="switch" id="scale-tog" checked autocomplete="off"></label>
<p class="hb-hint">Makes the spin look like an arrival.</p>
</div>
<div class="hb-setting">
- <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked></label>
+ <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked autocomplete="off"></label>
<p class="hb-hint">Softens the first moment.</p>
</div>
</div>
diff --git a/animations/02-entrance-and-exit/scale-in/index.html b/animations/02-entrance-and-exit/scale-in/index.html
index 0a7c8403..8b940677 100644
--- a/animations/02-entrance-and-exit/scale-in/index.html
+++ b/animations/02-entrance-and-exit/scale-in/index.html
@@ -62,8 +62,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
@@ -116,7 +116,7 @@
<p class="hb-hint">Springy grows a little too big, then settles.</p>
</div>
<div class="hb-setting">
- <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked></label>
+ <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked autocomplete="off"></label>
<p class="hb-hint">Stops it flashing in at full strength while tiny.</p>
</div>
</div>
diff --git a/animations/02-entrance-and-exit/slide-in/index.html b/animations/02-entrance-and-exit/slide-in/index.html
index 4764c3f3..b45fae23 100644
--- a/animations/02-entrance-and-exit/slide-in/index.html
+++ b/animations/02-entrance-and-exit/slide-in/index.html
@@ -62,8 +62,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
@@ -116,7 +116,7 @@
<p class="hb-hint">Springy goes a little past its spot, then settles.</p>
</div>
<div class="hb-setting">
- <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked></label>
+ <label class="hb-switch-row"><span>Fades in</span><input class="hb-switch" type="checkbox" role="switch" id="fade-tog" checked autocomplete="off"></label>
<p class="hb-hint">A slide on its own can look mechanical.</p>
</div>
</div>
diff --git a/animations/02-entrance-and-exit/slide-up-reveal/index.html b/animations/02-entrance-and-exit/slide-up-reveal/index.html
index 3790af8c..a531aad3 100644
--- a/animations/02-entrance-and-exit/slide-up-reveal/index.html
+++ b/animations/02-entrance-and-exit/slide-up-reveal/index.html
@@ -62,8 +62,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
diff --git a/animations/02-entrance-and-exit/split-text-reveal/index.html b/animations/02-entrance-and-exit/split-text-reveal/index.html
index a8b1c2d6..274bc2fa 100644
--- a/animations/02-entrance-and-exit/split-text-reveal/index.html
+++ b/animations/02-entrance-and-exit/split-text-reveal/index.html
@@ -72,8 +72,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
@@ -135,7 +135,7 @@
</div>
<div class="hb-setting">
<label class="hb-setting-name" for="txt-in">Your text</label>
- <input class="hb-text" type="text" id="txt-in" value="Design beyond the obvious">
+ <input class="hb-text" type="text" id="txt-in" value="Design beyond the obvious" autocomplete="off">
<p class="hb-hint">Type your own words to see them split.</p>
</div>
</div>
diff --git a/animations/02-entrance-and-exit/word-by-word-reveal/index.html b/animations/02-entrance-and-exit/word-by-word-reveal/index.html
index f0991a2c..abd73e12 100644
--- a/animations/02-entrance-and-exit/word-by-word-reveal/index.html
+++ b/animations/02-entrance-and-exit/word-by-word-reveal/index.html
@@ -63,8 +63,8 @@
</div>
<div class="hb-player">
<button class="hb-play" type="button" id="btn-play" data-hb-replay><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>Replay</button>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop><span>Loop</span></label>
- <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo><span>Slow motion</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="loop-tog" data-hb-loop autocomplete="off"><span>Loop</span></label>
+ <label class="hb-toggle"><input class="hb-switch" type="checkbox" role="switch" id="slow-tog" data-hb-slowmo autocomplete="off"><span>Slow motion</span></label>
</div>
</section>
@@ -117,12 +117,12 @@
<p class="hb-hint">Springy adds a small bounce as each word lands.</p>
</div>
<div class="hb-setting">
- <label class="hb-switch-row"><span>Pauses between sentences</span><input class="hb-switch" type="checkbox" role="switch" id="punct-tog"></label>
+ <label class="hb-switch-row"><span>Pauses between sentences</span><input class="hb-switch" type="checkbox" role="switch" id="punct-tog" autocomplete="off"></label>
<p class="hb-hint">Waits a little longer before each new sentence.</p>
</div>
<div class="hb-setting">
<label class="hb-setting-name" for="txt-in">Your text</label>
- <textarea class="hb-text" id="txt-in">We build interfaces that disappear.
+ <textarea class="hb-text" id="txt-in" autocomplete="off">We build interfaces that disappear.
Tools that feel inevitable.
Software made with care.</textarea>
<p class="hb-hint">Put each sentence on its own line.</p>
diff --git a/assets/css/demo-page.css b/assets/css/demo-page.css
index 72241b43..feeca68e 100644
--- a/assets/css/demo-page.css
+++ b/assets/css/demo-page.css
@@ -66,6 +66,10 @@ body.hb [hidden]{display:none!important}
.hb-player{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.hb-play,.hb-toggle{box-sizing:border-box;display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 18px;
border:1px solid rgba(255,255,255,.18);border-radius:8px;background:none;color:var(--hb-ink);font:500 15px/1 var(--hb-font);cursor:pointer}
+/* Under reduced motion the shared script switches Loop and Slow motion off, greys them out and adds a note */
+.hb-toggle.is-disabled{opacity:.45;cursor:not-allowed}
+.hb-toggle.is-disabled .hb-switch{cursor:not-allowed}
+.hb-player-note{flex-basis:100%;margin:0;font:400 13px/1.4 var(--hb-font);color:var(--hb-muted)}
/* Switches: a checkbox drawn as a track and knob (gradients, so no pseudo-elements on the input) */
.hb-switch{appearance:none;-webkit-appearance:none;flex:none;width:32px;height:20px;margin:0;border-radius:999px;cursor:pointer;
@@ -182,9 +186,10 @@ textarea.hb-text{min-height:88px;padding:10px 12px;resize:vertical}
.hb-step-head{gap:12px}
.hb-num{width:30px;height:30px;font-size:15px}
.hb-step-head p{font-size:15px}
- /* Three controls do not fit on one line at phone widths: Replay takes the first row, the two switches share the second */
+ /* Three controls do not fit on one line at phone widths: Replay takes the first row, the two switches share the
+ second, and the reduced-motion note gets a row of its own */
.hb-player{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
- .hb-play{grid-column:1/-1}
+ .hb-play,.hb-player-note{grid-column:1/-1}
.hb-play,.hb-toggle{justify-content:center;gap:8px;padding:0 12px;font-size:14px}
.hb-page .seg button{flex:1 1 0;min-width:0;padding:0 8px}
.hb-prompt{font-size:16px;line-height:1.6}
diff --git a/assets/js/demo-page.js b/assets/js/demo-page.js
index edf99a25..0e0e1ae9 100644
--- a/assets/js/demo-page.js
+++ b/assets/js/demo-page.js
@@ -1,6 +1,7 @@
/* Animation Handbook — shared behaviour for the guided-steps demo pages.
* Fills in "Your settings", Copy prompt, the README's "What it is" and "Similar
- * animations", plays the demo on arrival and replays it when a setting changes.
+ * animations", plays the demo on arrival, replays it when a setting changes, and
+ * greys out Loop and Slow motion under reduced motion.
* The pure helpers are exported for tests/demo-page.test.js. */
(function (root, factory) {
var api = factory();
@@ -299,14 +300,45 @@
replayTimer = win.setTimeout(replay, 250);
}
+ // While the device asks for reduced motion, Loop and Slow motion are switched off and cannot be switched
+ // on, and a note in the player bar says why. Replay still plays the demo's gentle version.
+ var playerSwitches = [loopCtl, slowCtl].filter(Boolean);
+ var motionNote = null;
+ function followReducedMotion() {
+ var reduced = !!(reduce && reduce.matches);
+ playerSwitches.forEach(function (sw) {
+ if (reduced) sw.checked = false;
+ sw.disabled = reduced;
+ var label = sw.closest('label.hb-toggle');
+ if (label) label.classList.toggle('is-disabled', reduced);
+ });
+ if (reduced && !motionNote && playerSwitches.length) {
+ var names = [loopCtl && 'Loop', slowCtl && 'Slow motion'].filter(Boolean);
+ motionNote = doc.createElement('p');
+ motionNote.className = 'hb-player-note';
+ motionNote.textContent = names.join(' and ') + (names.length > 1 ? ' are' : ' is') +
+ ' off because your device is set to reduce motion.';
+ var last = playerSwitches[playerSwitches.length - 1];
+ (last.closest('label.hb-toggle') || last).insertAdjacentElement('afterend', motionNote);
+ } else if (!reduced && motionNote) {
+ motionNote.parentNode.removeChild(motionNote);
+ motionNote = null;
+ }
+ }
+
setUpPrompt();
if (copyBtn) setUpCopy();
if (tryStep) ['input', 'change', 'click'].forEach(function (type) { tryStep.addEventListener(type, onSettingsChange); });
if (slowCtl) slowCtl.addEventListener('change', replay);
+ followReducedMotion();
+ if (reduce && reduce.addEventListener) reduce.addEventListener('change', followReducedMotion);
+ else if (reduce && reduce.addListener) reduce.addListener(followReducedMotion);
if (doc.body.hasAttribute('data-hb-autoplay')) {
win.setTimeout(function () {
if (loopCtl && !(reduce && reduce.matches)) {
- if (!loopCtl.checked) loopCtl.click();
+ // After Back or a reload a browser can bring Loop back already on; press Replay so the demo still starts.
+ if (loopCtl.checked) replay();
+ else loopCtl.click();
} else {
replay();
}
diff --git a/docs/superpowers/specs/2026-09-27-demo-page-rollout-design.md b/docs/superpowers/specs/2026-09-27-demo-page-rollout-design.md
index b453edb5..b7ee879f 100644
--- a/docs/superpowers/specs/2026-09-27-demo-page-rollout-design.md
+++ b/docs/superpowers/specs/2026-09-27-demo-page-rollout-design.md
@@ -22,8 +22,8 @@ that spec's "Open template questions for the rollout" and adds what the other ki
| Kind | About | Step 1 title | Default help line | Player bar | On arrival | With reduced motion |
|---|---|---|---|---|---|---|
-| **Plays once** | 20 | Watch it | It plays by itself. Turn on slow motion to see each part of the movement. | Replay · Loop · Slow motion | Loop switches on (Replay once when there is no Loop) | Loop stays off; Replay runs once so the stage is not empty |
-| **Loops** | 30 | Watch it | It moves by itself. Pause it to look closely. | Pause · Slow motion | nothing (it is already moving) | starts paused; Play is one press away |
+| **Plays once** | 20 | Watch it | It plays by itself. Turn on slow motion to see each part of the movement. | Replay · Loop · Slow motion | Loop switches on (Replay once when there is no Loop) | Loop and Slow motion are shown switched off and cannot be switched on, with a note; Replay runs once so the stage is not empty |
+| **Loops** | 30 | Watch it | It moves by itself. Pause it to look closely. | Pause · Slow motion | nothing (it is already moving) | starts paused; Play is one press away; Slow motion is shown switched off and cannot be switched on, with a note |
| **Scroll** | 27 | Scroll it | Scroll inside the box, or press Play and it scrolls for you. | Play · Back to top | Play once: the box scrolls to its end over about six seconds | no automatic scroll; Play still works |
| **Do it** | 50 | Hover it · Click it · Drag it · Press Tab (per page) | Written per page, e.g. "Point at a card, or tap it on a phone." | Show me · Reset (when the demo has a state to reset) | Show me once | no automatic run; Show me still works |
@@ -103,8 +103,8 @@ in the same `.hb-setting`. If a label or value still comes out empty, the shared
## Reduced motion
Covered in the kinds table: plays-once pages play their reduced version once; loops start paused; scroll and do-it
-pages do nothing on arrival. The Loop, Slow motion, Pause, Play and Show me controls always work when the visitor
-presses them.
+pages do nothing on arrival. Loop and Slow motion are shown switched off and cannot be switched on, with a short note
+in the player bar; Replay, Pause, Play and Show me still work when the visitor presses them.
---