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.

feat: home page sections: place chips under Good places to start, a Famous effects band and How it works in new words

matinc184046a4d36
diff --git a/docs/superpowers/specs/2026-11-04-home-sections-design.md b/docs/superpowers/specs/2026-11-04-home-sections-design.md
new file mode 100644
index 00000000..7d41f2fa
--- /dev/null
+++ b/docs/superpowers/specs/2026-11-04-home-sections-design.md
@@ -0,0 +1,45 @@
+# Home page sections — design
+
+The owner's choice of 2026-11-04, after the study of ten home page designs (`.superpowers/home-designs/`, not in the
+repository): keep the first part of the home page as it is, and take the next sections from two of the designs, Spotlight
+and Moments. Where this spec and `2026-09-30-home-page-redesign-design.md` differ, this one wins.
+
+## The page, top to bottom
+
+1. **As before:** the top bar, the hero (pill, heading, line, search, Popular, "Don't know the name? Find it") and the nine
+ place tiles. Nothing here changes.
+2. **Good places to start (from Spotlight).** The heading, the line "Eight favorites from different places. Type above, or
+ pick a place.", then a row of place chips, then the cards and Browse all as before.
+3. **Famous effects (from Moments).** A dark band: "Seen on well-known websites", the heading "Famous effects", the line
+ "Effects people admire on well-known websites, the handbook animations that make something similar, and a prompt to
+ build your own." and a white button "See famous effects" to `famous/`; beside them, three of our own previews fanned like
+ cards on a table (Mesh Gradient, Page Curl, Stacking Cards).
+4. **How it works (from Moments).** "Three steps, and no code to read.": 1 Pick an animation ("Start from a few words, a
+ part of your page, or three short questions."), 2 See it move ("Every animation plays live. Open its page to watch it big
+ and try a few simple settings."), 3 Copy the prompt ("Paste it into your AI assistant. It describes the animation in
+ plain words."), then "Free and open source (MIT). No sign-up." and the footer as before.
+
+## The place chips
+
+- `div.spots` (a group named Places) holds All and the nine places, each a `button.spot` with `data-place` and
+ `aria-pressed`; a place chip has a dot in its tile's color. All has `data-place=""` and stands for Start.
+- They work as the place tiles do (the same click handler): a place chip shows that place, the pressed one pressed again
+ goes back to Start, All goes back to Start. Exactly one chip is pressed.
+- They show at Start and on a place. A search, the finder and All animations hide them (a search and a place are never
+ shown together).
+- Desktop: one line at 1280px (40px tall); narrower windows wrap them. Phones: one row that scrolls sideways, every chip at
+ least 44 × 44px, and hidden while the slim bar at the top (with its own place chips) is there.
+
+## The Famous effects band
+
+- One column from 900px down (the previews under the words, at most 440px wide); on phones the button fills the width.
+- Dark mode: the band takes the page's surface color with a thin line around it.
+- The previews are the cards' own (`pvMarkup()`), inside `div.fam-card` (the group color class, `data-pv`); they play only
+ while on screen (the cards' observer and the `.playing` class, with the band's own pause rule) and hold their still frame
+ under reduced motion (`hold()`). The fanned previews are decoration, hidden from screen readers.
+
+## Checks
+
+The place test in `tests/pages.test.js` counts one chip per place under the results heading and allows one button with an
+empty place (All). The page check (`tools/check-pages.mjs`) counts the chips and the band's button among the phone touch
+targets.
diff --git a/index.html b/index.html
index 53a14a42..e78913bb 100644
--- a/index.html
+++ b/index.html
@@ -204,6 +204,13 @@ button,input{font:inherit;color:inherit}
.rtitle{font-size:clamp(24px,2.6vw,32px);font-weight:800;letter-spacing:-.02em;line-height:1.1}
.rsub{margin-top:6px;font-size:16px;color:var(--muted)}
.pillbtn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:15px;font-weight:600;cursor:pointer}
+/* the place chips under the heading, as in the place tiles: All (Start) and the nine places, each with its tile's color as a dot.
+ They show at Start and on a place; a search, the finder and All animations hide them. */
+.spots{display:flex;flex-wrap:wrap;gap:6px;margin:-8px 0 24px}
+.spot{display:inline-flex;align-items:center;gap:5px;flex:none;min-height:40px;padding:0 11px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:13.5px;font-weight:600;color:var(--ink-2);white-space:nowrap;cursor:pointer}
+.spot i{width:8px;height:8px;flex:none;border-radius:50%;background:var(--pa)}
+.spot[aria-pressed="true"]{border-color:var(--ink);background:var(--ink);color:var(--bg)}
+@media(hover:hover){.spot:hover{border-color:var(--ink)}}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.group{scroll-margin-top:12px}
.group+.group{margin-top:56px}
@@ -250,13 +257,33 @@ button,input{font:inherit;color:inherit}
/* how it works, footer, message */
.how{margin-top:clamp(56px,8vw,96px);padding:clamp(36px,6vw,80px) 0;background:var(--surface);border-block:1px solid var(--line-2)}
-.how-head{display:flex;flex-direction:column;align-items:center;gap:6px;margin-bottom:40px;text-align:center}
+.how-head{display:flex;flex-direction:column;align-items:center;gap:10px;margin-bottom:36px;text-align:center}
+.how-head .rtitle,.fam-h{font-size:clamp(26px,2.8vw,38px);letter-spacing:-.025em}
+.how-head .rsub{margin-top:0;font-size:17px;color:var(--ink-2)}
.steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;list-style:none}
.step{display:flex;flex-direction:column;gap:10px;padding:28px;border-radius:20px;background:var(--bg)}
.step-n{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:50%;background:var(--ink);color:var(--bg);font-size:18px;font-weight:800}
.step-t{margin-top:6px;font-size:20px;font-weight:700}
.step-p{margin-top:4px;font-size:16px;line-height:1.55;color:var(--ink-2)}
.fine{margin-top:32px;text-align:center;font-size:15px;color:var(--muted)}
+/* Famous effects: a dark band, its words and link beside three of our own previews fanned like cards on a table. The previews
+ play while the band is on screen, as the cards do, and hold their still frame under reduced motion. */
+.fam{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:clamp(24px,4vw,56px);margin-top:clamp(64px,8vw,112px);padding:clamp(24px,4vw,56px);border-radius:32px;background:#16161b;color:#f4f4f2;overflow:hidden}
+:root[data-theme="dark"] .fam{background:var(--surface);box-shadow:0 0 0 1px var(--line)}
+.fam :focus-visible{outline-color:#86a8ff}
+.fam-eye{font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#c6c6cc}
+.fam-h{margin-top:8px}
+.fam-p{max-width:480px;margin-top:12px;font-size:17px;line-height:1.55;color:#c6c6cc}
+.fam-btn{display:inline-flex;align-items:center;gap:10px;min-height:52px;margin-top:24px;padding:0 24px;border-radius:999px;background:#fff;color:#16161b;font-size:16px;font-weight:700;text-decoration:none;transition:background .2s}
+@media(hover:hover){.fam-btn:hover{background:#e4e4e9}}
+.fam-art{position:relative;height:clamp(190px,21vw,270px)}
+.fam-card{position:absolute;width:58%;border-radius:14px;box-shadow:0 20px 44px rgba(0,0,0,.45)}
+.fam-card .stage{border-radius:14px}
+.fam-card:nth-child(1){left:0;top:16%;transform:rotate(-6deg)}
+.fam-card:nth-child(2){right:0;top:20%;transform:rotate(5deg)}
+.fam-card:nth-child(3){left:21%;top:0;z-index:2}
+.fam-card:not(.playing) .pv .anim,.fam-card:not(.playing) .pv .anim::before,.fam-card:not(.playing) .pv .anim::after{animation-play-state:paused!important}
+@media(max-width:900px){.fam{grid-template-columns:minmax(0,1fr)}.fam-art{width:min(440px,100%);margin-inline:auto}}
.foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 24px;padding:36px 0 44px}
.foot-t{font-size:15px;color:var(--muted)}
.foot .nav{flex-wrap:wrap} /* three links: on the narrowest phones the last one moves to a second line */
@@ -303,6 +330,9 @@ button,input{font:inherit;color:inherit}
.pchips{display:flex;gap:8px;margin-inline:calc(-1 * var(--gut));padding-inline:var(--gut);overflow-x:auto;scrollbar-width:none}
.pchip{flex:none;min-height:44px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink-2);font-size:14px;font-weight:600;white-space:nowrap;cursor:pointer}
.pchip[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--surface)}
+ .spots{flex-wrap:nowrap;margin:-4px calc(-1 * var(--gut)) 16px;padding:2px var(--gut) 4px;overflow-x:auto;scrollbar-width:none}
+ .spot{min-width:44px;min-height:44px;justify-content:center}
+ .results.filtered .spots{display:none} /* the slim bar at the top holds the places then */
.group{scroll-margin-top:136px}
.rhead{margin-bottom:16px}
.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@@ -323,6 +353,9 @@ button,input{font:inherit;color:inherit}
.step-t{margin-top:0;font-size:17px}
.step-p{font-size:15px}
.foot{flex-direction:column;align-items:flex-start}
+ .fam{border-radius:26px}
+ .fam-btn{width:100%;justify-content:center}
+ .how-head .rsub{font-size:16px}
}
/* beyond the design: widths and places it does not show */
@@ -3155,9 +3188,21 @@ button,input{font:inherit;color:inherit}
</div>
</div>
<div class="rhead">
- <div><h2 class="rtitle" id="results-title" tabindex="-1">Good places to start</h2><p class="rsub" id="results-sub" aria-live="polite">Eight favorites from different places. Pick a place above to see more.</p></div>
+ <div><h2 class="rtitle" id="results-title" tabindex="-1">Good places to start</h2><p class="rsub" id="results-sub" aria-live="polite">Eight favorites from different places. Type above, or pick a place.</p></div>
<button type="button" class="pillbtn" id="clear-view" hidden><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>Clear</button>
</div>
+ <div class="spots" id="spots" role="group" aria-label="Places">
+ <button type="button" class="spot" data-place="" aria-pressed="true">All</button>
+ <button type="button" class="spot" data-place="btn" aria-pressed="false"><i class="p-btn" aria-hidden="true"></i>Buttons</button>
+ <button type="button" class="spot" data-place="text" aria-pressed="false"><i class="p-text" aria-hidden="true"></i>Text</button>
+ <button type="button" class="spot" data-place="imgcard" aria-pressed="false"><i class="p-img" aria-hidden="true"></i>Images &amp; cards</button>
+ <button type="button" class="spot" data-place="bg" aria-pressed="false"><i class="p-bg" aria-hidden="true"></i>Backgrounds</button>
+ <button type="button" class="spot" data-place="menu" aria-pressed="false"><i class="p-menu" aria-hidden="true"></i>Menus &amp; forms</button>
+ <button type="button" class="spot" data-place="load" aria-pressed="false"><i class="p-load" aria-hidden="true"></i>Loading &amp; messages</button>
+ <button type="button" class="spot" data-place="intro" aria-pressed="false"><i class="p-intro" aria-hidden="true"></i>Page intros</button>
+ <button type="button" class="spot" data-place="scroll" aria-pressed="false"><i class="p-scroll" aria-hidden="true"></i>Scrolling</button>
+ <button type="button" class="spot" data-place="page" aria-pressed="false"><i class="p-page" aria-hidden="true"></i>Page changes</button>
+ </div>
<div id="cards"></div>
<div class="empty" id="empty" hidden>
<p class="empty-t" id="empty-title">Nothing matches that yet</p>
@@ -3174,13 +3219,23 @@ button,input{font:inherit;color:inherit}
<noscript><p class="noscript">This page shows its animations with JavaScript. All 176 are still easy to reach: see the <a href="https://github.com/matinmonshizadeh/animation-handbook#categories">category list on GitHub</a> or the <a href="sitemap.xml">full sitemap</a>. Each demo is a page of its own under <code>/animations/&lt;category&gt;/&lt;name&gt;/</code>.</p></noscript>
</section>
+ <section class="wrap fam" aria-labelledby="fam-title">
+ <div>
+ <p class="fam-eye">Seen on well-known websites</p>
+ <h2 class="rtitle fam-h" id="fam-title">Famous effects</h2>
+ <p class="fam-p">Effects people admire on well-known websites, the handbook animations that make something similar, and a prompt to build your own.</p>
+ <a class="fam-btn" href="famous/">See famous effects<svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></a>
+ </div>
+ <div class="fam-art" id="fam-art" aria-hidden="true"></div>
+ </section>
+
<section class="how" id="how" aria-labelledby="how-title">
<div class="wrap">
<div class="how-head"><h2 class="rtitle" id="how-title">How it works</h2><p class="rsub">Three steps, and no code to read.</p></div>
<ol class="steps">
- <li class="step"><span class="step-n" aria-hidden="true">1</span><div><h3 class="step-t">Watch it</h3><p class="step-p">Every animation plays right on its page, so you see exactly what you will get.</p></div></li>
- <li class="step"><span class="step-n" aria-hidden="true">2</span><div><h3 class="step-t">Change it to fit</h3><p class="step-p">Try a few simple settings, like speed or direction, and watch the preview update.</p></div></li>
- <li class="step"><span class="step-n" aria-hidden="true">3</span><div><h3 class="step-t">Copy the prompt</h3><p class="step-p">Paste it into your AI assistant. It describes the animation in plain words, with your settings.</p></div></li>
+ <li class="step"><span class="step-n" aria-hidden="true">1</span><div><h3 class="step-t">Pick an animation</h3><p class="step-p">Start from a few words, a part of your page, or three short questions.</p></div></li>
+ <li class="step"><span class="step-n" aria-hidden="true">2</span><div><h3 class="step-t">See it move</h3><p class="step-p">Every animation plays live. Open its page to watch it big and try a few simple settings.</p></div></li>
+ <li class="step"><span class="step-n" aria-hidden="true">3</span><div><h3 class="step-t">Copy the prompt</h3><p class="step-p">Paste it into your AI assistant. It describes the animation in plain words.</p></div></li>
</ol>
<p class="fine">Free and open source (MIT). No sign-up.</p>
</div>
@@ -4468,6 +4523,20 @@ function showCards(list){
cardsBox.replaceChildren(grid);
place(cards);
}
+// Famous effects: three of our own previews, fanned like cards on a table. They play while on screen, as the cards do.
+['mesh-gradient','page-curl','stacking-cards'].forEach(slug=>{
+ const e=BY_SLUG[slug],pv=PV[slug]||'sig'+parseInt(e.cat.n,10),el=document.createElement('div');
+ el.className='fam-card '+e.cat.cat.replace('-cat','');
+ el.dataset.slug=slug;el.dataset.pv=pv;
+ el.innerHTML=`<div class="stage"><div class="pv pv-${pv}">${pvMarkup(pv)}</div></div>`;
+ if(reduce)el.querySelectorAll('animate').forEach(a=>a.remove());
+ const eng=engines[pv]?engines[pv](el.querySelector('.pv')):null;
+ el._play=()=>{el.classList.add('playing');eng&&eng.play();};
+ el._pause=()=>{el.classList.remove('playing');eng&&eng.pause();};
+ $('fam-art').appendChild(el);
+ if(io)io.observe(el);else el._play();
+ if(reduce)hold(el);
+});
document.querySelectorAll('[data-count]').forEach(el=>{
const n=ALL.filter(e=>e.places.includes(el.dataset.count)).length;
el.textContent=n+(n===1?' animation':' animations');
@@ -4575,7 +4644,7 @@ const isFiltered=()=>!!(state.q||state.place||state.view);
const q=$('q'),q2=$('q2'),qClear=$('q-clear'),titleEl=$('results-title'),subEl=$('results-sub'),clearBtn=$('clear-view'),
emptyEl=$('empty'),emptyTitle=$('empty-title'),moreBox=$('more'),moreLabel=$('more-label');
let moreAction='all';
-const pinbar=$('pinbar');
+const pinbar=$('pinbar'),spotsEl=$('spots');
// The phone bar is there while a view other than Start or the finder is open and while its own search box has focus, so emptying the box does not take the box away; never in the finder.
const syncBar=()=>resultsEl.classList.toggle('filtered',state.view!=='find'&&(isFiltered()||document.activeElement===q2));
// A pressed button that goes away with the view hands keyboard focus to the results heading. No scrolling: the callers that move the page scroll it themselves.
@@ -4595,7 +4664,7 @@ function render(answered){
}else if(state.view==='all'){
title='All animations';sub=ALL.length+' animations in '+CATS.length+' groups.';
}else{
- list=PICKS.map(s=>BY_SLUG[s]);title='Good places to start';sub='Eight favorites from different places. Pick a place above to see more.';
+ list=PICKS.map(s=>BY_SLUG[s]);title='Good places to start';sub='Eight favorites from different places. Type above, or pick a place.';
}
titleEl.textContent=title;say(sub,finding&&answered);
showFinder(finding,found);
@@ -4603,6 +4672,7 @@ function render(answered){
syncBar();
resultsEl.classList.toggle('no-tags',!tags);
clearBtn.hidden=!filtered||finding;
+ spotsEl.hidden=!!(state.q||state.view);
if(found)showFound(found);else if(list)showCards(state.all||!filtered?list:list.slice(0,PAGE));else showGroups();
const empty=!!list&&!list.length,matched=found?found.best.length+found.close.length:0;
emptyEl.hidden=!empty;
diff --git a/sitemap.xml b/sitemap.xml
index cac89957..20b529d8 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
- <url><loc>https://matinmonshizadeh.github.io/animation-handbook/</loc><lastmod>2026-11-03</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url>
+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/</loc><lastmod>2026-11-04</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url>
<url><loc>https://matinmonshizadeh.github.io/animation-handbook/famous/</loc><lastmod>2026-11-03</lastmod><changefreq>monthly</changefreq><priority>0.8</priority></url>
<url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/parallax-depth-of-field/</loc><lastmod>2026-10-20</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
<url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/parallax-scrolling/</loc><lastmod>2026-10-15</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
diff --git a/tests/pages.test.js b/tests/pages.test.js
index 75c4a9b1..87fca788 100644
--- a/tests/pages.test.js
+++ b/tests/pages.test.js
@@ -1104,17 +1104,22 @@ test('the home page head gives search engines and social sites one title, one de
assert.match(head, /<link rel="canonical" href="[^"]*">\r?\n<link rel="sitemap" type="application\/xml" title="Sitemap" href="sitemap\.xml">\r?\n/, 'the sitemap link, right after the canonical link');
});
-test('every place has one tile, one phone-bar chip and one count, and the markup names no other place', () => {
+test('every place has one tile, one phone-bar chip, one chip under the results heading and one count, and the markup names no other place', () => {
// The opening tags of the page's markup: scripts, styles and comments left out.
const tags = HOME.replace(/<script\b[\s\S]*?<\/script>|<style\b[\s\S]*?<\/style>|<!--[\s\S]*?-->/g, '').match(/<[a-z][^>]*>/g);
const attr = (tag, name) => (tag.match(new RegExp(`\\s${name}="([^"]*)"`)) || [])[1];
const hasClass = (tag, name) => (attr(tag, 'class') || '').split(/\s+/).includes(name);
const placed = tags.filter(tag => attr(tag, 'data-place') !== undefined), counted = tags.filter(tag => attr(tag, 'data-count') !== undefined);
- for (const tag of placed) assert.ok(PLACE_KEYS.includes(attr(tag, 'data-place')), `unknown place: ${tag}`);
+ // All, the first chip under the results heading, names no place: it goes back to Start.
+ const all = placed.filter(tag => attr(tag, 'data-place') === '');
+ assert.equal(all.length, 1, 'one button names no place: All');
+ assert.ok(hasClass(all[0], 'spot'), 'All is a chip under the results heading');
+ for (const tag of placed) if (tag !== all[0]) assert.ok(PLACE_KEYS.includes(attr(tag, 'data-place')), `unknown place: ${tag}`);
for (const tag of counted) assert.ok(PLACE_KEYS.includes(attr(tag, 'data-count')), `unknown place: ${tag}`);
for (const key of PLACE_KEYS) {
assert.equal(placed.filter(tag => attr(tag, 'data-place') === key && hasClass(tag, 'place')).length, 1, `one ${key} tile`);
assert.equal(placed.filter(tag => attr(tag, 'data-place') === key && hasClass(tag, 'pchip')).length, 1, `one ${key} chip in the phone bar`);
+ assert.equal(placed.filter(tag => attr(tag, 'data-place') === key && hasClass(tag, 'spot')).length, 1, `one ${key} chip under the results heading`);
assert.equal(counted.filter(tag => attr(tag, 'data-count') === key).length, 1, `one ${key} count`);
}
});
diff --git a/tools/check-pages.mjs b/tools/check-pages.mjs
index 39ff1bfc..542f7915 100644
--- a/tools/check-pages.mjs
+++ b/tools/check-pages.mjs
@@ -172,7 +172,7 @@ const homeCheck = firstScreen => `(() => {
if (!document.getElementById('places')) problems.push('not the new home page');
if (document.documentElement.scrollWidth > document.documentElement.clientWidth + 1) problems.push('horizontal overflow');
if (phone) {
- const small = [...document.querySelectorAll('.top a, .top button, .search button, #q, #q2, .pop button, .place, .card .copy, .pillbtn, .bigbtn, .pinbar button, .foot a')]
+ const small = [...document.querySelectorAll('.top a, .top button, .search button, #q, #q2, .pop button, .place, .card .copy, .pillbtn, .bigbtn, .pinbar button, .spots button, .fam a, .foot a')]
.filter(el => el.getClientRects().length)
.filter(el => { const b = r(el); return b.width < 44 || b.height < 44; })
.map(el => el.tagName.toLowerCase() + (el.getAttribute('class') ? '.' + el.getAttribute('class').split(' ')[0] : '') + ' ' + Math.round(r(el).width) + 'x' + Math.round(r(el).height));