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: Circle Reveal (03.13)

matindf3fbf0253db
diff --git a/README.md b/README.md
index 60328023..49b2cd04 100644
--- a/README.md
+++ b/README.md
@@ -115,6 +115,7 @@ All 129 techniques, each linked to its live demo.
- **[Portal / Tunnel Zoom](animations/03-page-transitions/portal-zoom/)** — The next page opens out of a circle you click. Best for big reveals.
- **[Dissolve](animations/03-page-transitions/dissolve/)** — The page breaks into tiles that give way to the next. Best for photo galleries.
- **[FLIP Technique](animations/03-page-transitions/flip-technique/)** — Cards glide to their new places when the layout changes. Best for sorting lists.
+- **[Circle Reveal](animations/03-page-transitions/circle-reveal/)** — The next page grows in a circle from the spot you click. Best for app-style navigation.
</details>
diff --git a/animations/03-page-transitions/README.md b/animations/03-page-transitions/README.md
index 9e0be56d..00ecdca4 100644
--- a/animations/03-page-transitions/README.md
+++ b/animations/03-page-transitions/README.md
@@ -16,3 +16,4 @@ Full-page transitions between routes or views — how one screen gives way to th
- [Portal / Tunnel Zoom](portal-zoom/) — The next page opens out of a circle you click. Best for big reveals.
- [Dissolve](dissolve/) — The page breaks into tiles that give way to the next. Best for photo galleries.
- [FLIP Technique](flip-technique/) — Cards glide to their new places when the layout changes. Best for sorting lists.
+- [Circle Reveal](circle-reveal/) — The next page grows in a circle from the spot you click. Best for app-style navigation.
diff --git a/animations/03-page-transitions/circle-reveal/README.md b/animations/03-page-transitions/circle-reveal/README.md
new file mode 100644
index 00000000..90cd2f5c
--- /dev/null
+++ b/animations/03-page-transitions/circle-reveal/README.md
@@ -0,0 +1,47 @@
+# Circle Reveal
+
+## What it is
+A circle reveal shows the next page through a circle that starts as a dot and grows until the new page fills the view. The dot sits where the visitor clicked or tapped, so the new page seems to spread out from their finger. Going back can run it the other way: the old page shrinks into the spot and uncovers the earlier one.
+
+## When to use it
+- App-style navigation, where a new view should grow out of the button that opened it
+- Theme switches, where the dark or light version of the page spreads out from the toggle
+- Round menu buttons and floating action buttons that open into a full panel
+- Any change where the place of the click carries meaning: this card, this button, this spot on a map
+
+## How it works
+Both pages sit in the same box. The page that moves is put on top and clipped to a circle: for an opening, the new page starts as a circle of radius zero at the click and grows; for a closing (going back with Closes when you go back on), the old page stays on top and its circle shrinks to zero. The end size is the distance to the farthest corner of the box, measured when the change starts:
+
+```js
+const w=area.clientWidth,h=area.clientHeight;
+const x=origin==='center'?w/2:origin==='corner'?w:pt.x,y=origin==='center'?h/2:origin==='corner'?h:pt.y;
+const far=Math.ceil(Math.max(Math.hypot(x,y),Math.hypot(w-x,y),Math.hypot(x,h-y),Math.hypot(w-x,h-y)));
+const closing=closeTog.checked&&next<prev,top=closing?oldEl:newEl,at=`px at ${x.toFixed(1)}px ${y.toFixed(1)}px)`;
+top.style.zIndex='2';top.style.transition='none';top.style.clipPath='circle('+(closing?far:0)+at;
+top.offsetHeight; // commit the starting circle before the change is switched on
+top.style.transition=`clip-path ${d}ms cubic-bezier(.4,0,.2,1)`;
+top.style.clipPath='circle('+(closing?0:far)+at;
+```
+
+The click spot comes from the pointer event (`clientX` and `clientY`, less the box's own corner). A click made with the keyboard has no spot (its `detail` is 0), so the circle starts from the middle of the pressed button instead. A page name sits above the page box, so a circle that starts there begins just above the top edge and spreads down from the button.
+
+## Key parameters
+| Parameter | Default | Effect |
+|-----------|---------|--------|
+| Where it starts | Where you click | Where you click follows the pointer, or the middle of the button for a keyboard press; Center and Corner (the bottom right) always start in the same place |
+| Speed | Normal | How long the circle takes to cover the page: slow is 1200ms, normal 750ms and fast 450ms |
+| Closes when you go back | on | Going to an earlier page shrinks the old page into the spot instead of growing the earlier one out of it |
+
+## Production notes
+- **Reach the farthest corner.** A circle as wide as the box leaves the corners uncovered until the very end. The distance from the start to the farthest corner is the smallest radius that covers everything, so the change ends exactly when the last corner is reached.
+- **Force the reflow.** Reading `offsetHeight` between the starting circle and the transition makes the browser commit the dot first; without it both writes merge and the page appears at once.
+- **Measure at the moment of the click.** The box can move between clicks (scrolling, a resize), so read its position in the click handler, never once at load.
+- **`clip-path` is cheap but not free.** The browser repaints the clipped page while the circle grows. Keep the page that is clipped light, and avoid heavy filters or shadows on it.
+- **Reduced motion** fades the new page in over 300ms instead; nothing grows.
+- **Library equivalents.** The View Transitions API does this natively: start the change with `document.startViewTransition()`, then animate `clip-path` on `::view-transition-new(root)` from a circle at the click to the full radius (the usual dark-mode toggle). GSAP and Framer Motion animate `clipPath` strings directly.
+
+## See also
+- [Portal / Tunnel Zoom](../portal-zoom/) — the circle opens from one round button
+- [Clip-Path Reveal](../../02-entrance-and-exit/clip-path-reveal/) — a growing shape uncovers a single element
+- [Click / Tap Ripple](../../04-micro-interactions/click-ripple/) — a ring spreads from the spot you press
+- [Crossfade Transition](../crossfade/) — the plain fade it falls back to
diff --git a/animations/03-page-transitions/circle-reveal/index.html b/animations/03-page-transitions/circle-reveal/index.html
new file mode 100644
index 00000000..81beceec
--- /dev/null
+++ b/animations/03-page-transitions/circle-reveal/index.html
@@ -0,0 +1,288 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Circle Reveal — Animation Handbook</title>
+ <meta name="description" content="The next page grows in a circle from the spot you click. Best for app-style navigation.">
+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/circle-reveal/">
+ <link rel="icon" type="image/png" sizes="96x96" href="../../../favicon.png">
+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
+ <link rel="apple-touch-icon" href="../../../apple-touch-icon.png">
+ <meta property="og:type" content="article">
+ <meta property="og:site_name" content="Animation Handbook">
+ <meta property="og:title" content="Circle Reveal — Animation Handbook">
+ <meta property="og:description" content="The next page grows in a circle from the spot you click. Best for app-style navigation.">
+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/circle-reveal/">
+ <meta property="og:image" content="https://matinmonshizadeh.github.io/animation-handbook/og-image.png">
+ <meta name="twitter:card" content="summary_large_image">
+ <meta name="twitter:title" content="Circle Reveal — Animation Handbook">
+ <meta name="twitter:description" content="The next page grows in a circle from the spot you click. Best for app-style navigation.">
+ <meta name="twitter:image" content="https://matinmonshizadeh.github.io/animation-handbook/og-image.png">
+ <script type="application/ld+json">{"@context": "https://schema.org", "@type": "TechArticle", "headline": "Circle Reveal", "name": "Circle Reveal", "description": "The next page grows in a circle from the spot you click. Best for app-style navigation.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/circle-reveal/", "inLanguage": "en", "articleSection": "Page Transitions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Page Transitions, Circle Reveal"}</script>
+ <style>
+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#b98cff;--ui-text:#f4f4f2;--ui-muted:#8a8a92}
+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
+ .stage{position:relative;display:flex;flex-direction:column;overflow:hidden;background:var(--bg);color:var(--ui-text)}
+ .mini-nav{display:flex;gap:6px;padding:10px 12px;background:var(--ui-bg);border-bottom:1px solid var(--ui-border);flex-shrink:0}
+ .nav-btn{background:none;border:1px solid var(--ui-border);color:var(--ui-muted);font:inherit;font-size:13px;padding:0 12px;border-radius:4px;cursor:pointer;min-height:44px}
+ .nav-btn.active{border-color:var(--ui-accent);color:var(--ui-accent)}
+ @media(hover:hover){.nav-btn:hover{border-color:var(--ui-accent)}}
+ .page-area{flex:1;position:relative;overflow:hidden}
+ /* A click anywhere on the page on show opens the next one */
+ .page{position:absolute;inset:0;opacity:0;pointer-events:none;cursor:pointer}
+ .page.active{opacity:1;pointer-events:auto}
+ /* page content */
+ .pc{display:flex;flex-direction:column;justify-content:center;height:100%;padding:clamp(20px,4vw,40px);gap:12px}
+ .pe{font-size:10px;text-transform:uppercase;letter-spacing:3px;opacity:.6}
+ .ph{font-size:clamp(22px,3.5vw,36px);font-weight:bold;line-height:1.15}
+ .pp{font-size:12px;opacity:.6;line-height:1.65;max-width:320px}
+ .pgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:4px}
+ .gi{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);border-radius:6px;padding:18px 12px;font-size:11px}
+ .pstat{display:flex;gap:20px;margin-top:4px}
+ .pstat b{display:block;font-size:clamp(18px,2.5vw,24px);color:var(--ui-accent)}
+ .pstat span{font-size:9px;opacity:.6;text-transform:uppercase;letter-spacing:1px}
+ /* The ring that marks where a click of Show me lands */
+ .tap{position:absolute;left:0;top:0;z-index:5;width:32px;height:32px;margin:-16px 0 0 -16px;border:2px solid #fff;border-radius:50%;pointer-events:none;opacity:0}
+ .tap.on{animation:tap .45s ease-out}
+ @keyframes tap{0%{opacity:0;scale:.4}35%{opacity:.9}100%{opacity:0;scale:1.5}}
+ /* Short windows leave the page area under 220px: tighter spacing keeps the tallest page inside it with room to spare */
+ @media(max-height:640px){.pc{gap:8px}.gi{padding:12px}}
+ @media(prefers-reduced-motion:reduce){.tap{display:none}}
+ </style>
+ <link rel="stylesheet" href="../../../assets/css/demo-page.css?v=6">
+ <script src="../../../assets/js/demo-page.js?v=6" defer></script>
+</head>
+<body class="hb" data-hb-kind="do" data-hb-autoplay>
+<nav class="hb-bar" aria-label="Animation Handbook">
+ <a class="hb-home" href="../../../"><svg class="hb-mark" viewBox="0 0 32 32" aria-hidden="true"><g class="g"><circle cx="11.16" cy="20.84" r="6.1"/><circle cx="15.12" cy="16.88" r="6.1"/><circle cx="18.51" cy="13.49" r="6.1"/></g><circle class="b" cx="21.2" cy="10.8" r="6.6"/></svg><span>Animation Handbook</span></a>
+ <span class="hb-pager"><a href="../flip-technique/" rel="prev" aria-label="Previous: FLIP Technique"><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="m15 18-6-6 6-6"/></svg><span><span class="hb-dir">Previous: </span>FLIP Technique</span></a></span>
+</nav>
+<main class="hb-page">
+ <header class="hb-head">
+ <p class="hb-cat">03.13 · Page Transitions</p>
+ <h1>Circle Reveal</h1>
+ <p class="hb-lede">The next page grows in a circle from the spot you click. Best for app-style navigation.</p>
+ </header>
+
+ <section class="hb-step hb-watch" aria-labelledby="hb-watch-title">
+ <div class="hb-step-head">
+ <span class="hb-num" aria-hidden="true">1</span>
+ <div><h2 id="hb-watch-title">Click it</h2><p>Click anywhere on the page or a page name at the top of the box, or press Show me.</p></div>
+ </div>
+ <div class="stage">
+ <nav class="mini-nav" id="nav" aria-label="Demo pages"></nav>
+ <div class="page-area" id="page-area"></div>
+ <span class="tap" id="tap" aria-hidden="true"></span>
+ </div>
+ <div class="hb-player">
+ <button class="hb-play" type="button" id="btn-demo" data-hb-demo><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"/></svg>Show me</button>
+ <button class="hb-play" type="button" id="btn-reset" data-hb-reset><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>Reset</button>
+ <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>
+
+ <section class="hb-step hb-try" aria-labelledby="hb-try-title">
+ <div class="hb-step-head">
+ <span class="hb-num" aria-hidden="true">2</span>
+ <div><h2 id="hb-try-title">Try it</h2><p>Change a setting, then try it again or press Show me.</p></div>
+ </div>
+ <div class="hb-settings">
+ <div class="hb-setting">
+ <p class="hb-setting-name" id="origin-lbl">Where it starts</p>
+ <div class="seg" id="origin-seg" role="group" aria-labelledby="origin-lbl">
+ <button type="button" data-origin="click" class="on" aria-pressed="true">Where you click</button>
+ <button type="button" data-origin="center" aria-pressed="false">Center</button>
+ <button type="button" data-origin="corner" aria-pressed="false">Corner</button>
+ </div>
+ <p class="hb-hint">Center and Corner (bottom right) ignore where you click.</p>
+ </div>
+ <div class="hb-setting">
+ <p class="hb-setting-name" id="speed-lbl">Speed</p>
+ <div class="seg" id="speed-seg" role="group" aria-labelledby="speed-lbl">
+ <button type="button" data-ms="1200" aria-pressed="false">Slow</button>
+ <button type="button" data-ms="750" class="on" aria-pressed="true">Normal</button>
+ <button type="button" data-ms="450" aria-pressed="false">Fast</button>
+ </div>
+ <p class="hb-hint">How long the circle takes to cover the page.</p>
+ </div>
+ </div>
+ <details class="hb-options">
+ <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>Closes when you go back</span><input class="hb-switch" type="checkbox" role="switch" id="close-tog" checked autocomplete="off"></label>
+ <p class="hb-hint">Going to an earlier page shrinks the old one into the spot instead.</p>
+ </div>
+ </div>
+ </details>
+ </section>
+
+ <section class="hb-step hb-prompt-step" aria-labelledby="hb-prompt-title">
+ <div class="hb-step-head">
+ <span class="hb-num" aria-hidden="true">3</span>
+ <div><h2 id="hb-prompt-title">Copy the prompt</h2><p>Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.</p></div>
+ </div>
+ <div class="hb-card">
+ <p class="hb-prompt">Add a circle reveal to [the links or buttons that change the page]. When the visitor clicks or taps, put the new page on top of the old one and show it only inside a circle that starts as a dot and grows until it covers everything. Measure the click at that moment, start the circle there and make its final size reach the farthest corner, so no corner is left uncovered. A press of the keyboard has no spot, so start from the middle of the pressed button. Grow only the visible circle; neither page moves. If the visitor has reduced motion turned on, crossfade the pages instead. Match the settings listed below.</p>
+ <div class="hb-chips-box" hidden>
+ <p class="hb-chips-title">Your settings</p>
+ <ul class="hb-chips"></ul>
+ </div>
+ <div class="hb-copy-row">
+ <button class="hb-copy" type="button"><svg class="hb-ic hb-i-copy" viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg><svg class="hb-ic hb-i-done" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg><span class="hb-copy-label" aria-live="polite">Copy prompt</span></button>
+ <p class="hb-hint">Replace the words in brackets with your own element. Your settings are added at the end.</p>
+ </div>
+ </div>
+ </section>
+
+ <section class="hb-about" aria-labelledby="hb-what-title">
+ <div class="hb-what">
+ <h2 id="hb-what-title">What it is</h2>
+ <div class="hb-what-text"><p>The full explanation is in <a href="README.md">README.md</a>.</p></div>
+ </div>
+ <div class="hb-fit">
+ <h2>Good for</h2>
+ <ul class="hb-tags hb-good"><li>App navigation</li><li>Theme switches</li><li>Menu buttons</li><li>Calls to action</li></ul>
+ <h3>Avoid on</h3>
+ <ul class="hb-tags hb-avoid"><li>Quick tab changes</li></ul>
+ </div>
+ </section>
+
+ <section class="hb-related" aria-labelledby="hb-related-title" hidden>
+ <h2 id="hb-related-title">Similar animations</h2>
+ <div class="hb-rel-list"></div>
+ </section>
+</main>
+<footer class="hb-foot"><span>Animation Handbook</span><a href="#top">Back to top ↑</a></footer>
+<script>
+ const PAGES=[
+ {name:'Home',bg:'linear-gradient(135deg,#0d1a2e,#192640)',html:`<div class="pc"><div class="pe">Creative Studio</div><p class="ph">Design without compromise.</p><p class="pp">We craft digital products that earn attention and keep it. Every pixel considered.</p></div>`},
+ {name:'Work',bg:'linear-gradient(135deg,#0d1f15,#152e1e)',html:`<div class="pc"><div class="pe">Selected Work</div><p class="ph">The Portfolio</p><div class="pgrid">${['Atlas','Orbit','Prism','Lumen','Frame','Echo'].map(n=>`<div class="gi">${n}</div>`).join('')}</div></div>`},
+ {name:'About',bg:'linear-gradient(135deg,#1f0d26,#2e1540)',html:`<div class="pc"><div class="pe">Our Story</div><p class="ph">Built on conviction.</p><p class="pp">18 people who care unreasonably about craft. Independent since 2016.</p><div class="pstat"><div><b>140+</b><span>Projects</span></div><div><b>9</b><span>Years</span></div><div><b>3</b><span>Continents</span></div></div></div>`},
+ ];
+ const nav=document.getElementById('nav'),area=document.getElementById('page-area'),tapEl=document.getElementById('tap');
+ const slowTog=document.getElementById('slow-tog'),closeTog=document.getElementById('close-tog');
+ const motionOk=!window.matchMedia('(prefers-reduced-motion:reduce)').matches;
+ let current=0,animating=false,origin='click',dur=750,afterMove=null,wayBack=0,timers=[];
+ const pages=[],navBtns=[];
+
+ // Where a click landed, in px from the page area's top-left corner. A click made with the keyboard has no spot (detail 0),
+ // so it counts from the middle of the control; a page name sits above the page area, so its spot has a negative y.
+ function spot(e,el){
+ const a=area.getBoundingClientRect(),r=el.getBoundingClientRect(),key=!e||!e.detail;
+ return {x:(key?r.left+r.width/2:e.clientX)-a.left,y:(key?r.top+r.height/2:e.clientY)-a.top};
+ }
+ PAGES.forEach((p,i)=>{
+ const d=document.createElement('div');d.className='page';d.style.background=p.bg;d.innerHTML=p.html;
+ d.addEventListener('click',e=>navigate((i+1)%PAGES.length,spot(e,d)));area.appendChild(d);pages.push(d);
+ const b=document.createElement('button');b.type='button';b.className='nav-btn';b.textContent=p.name;
+ b.addEventListener('click',e=>navigate(i,spot(e,b)));nav.appendChild(b);navBtns.push(b);
+ });
+
+ // Drops a timer's id once it fires, so `timers` only holds the ones still waiting.
+ function later(fn,wait){
+ const id=setTimeout(()=>{
+ const i=timers.indexOf(id);
+ if(i>-1)timers.splice(i,1);
+ fn();
+ },wait);
+ timers.push(id);
+ return id;
+ }
+ function cancel(id){
+ clearTimeout(id);
+ const i=timers.indexOf(id);
+ if(i>-1)timers.splice(i,1);
+ }
+
+ function updateNav(n){navBtns.forEach((b,i)=>{b.classList.toggle('active',i===n);b.setAttribute('aria-current',i===n?'page':'false')})}
+ // One page's resting look: its class alone shows or hides it, with no clip, fade or stacking left over (its background stays).
+ // A page that is not shown is also out of the Tab order and the accessibility tree (inert).
+ function rest(el,on){
+ el.classList.toggle('active',on);
+ el.inert=!on;
+ el.style.clipPath='';el.style.transition='';el.style.zIndex='';el.style.opacity='';
+ }
+ // The resting state for page n, at once. A circle or fade still running is cancelled too, and so is the ring.
+ function showPage(n){
+ pages.forEach((el,i)=>{rest(el,i===n);el.getAnimations().forEach(a=>a.cancel())});
+ tapEl.classList.remove('on');
+ updateNav(n);
+ }
+
+ // Ends a change: the demo is idle again, and a Show me run goes on to its next step
+ function finish(){
+ animating=false;
+ const then=afterMove;afterMove=null;
+ if(then)then();
+ }
+ // Stops everything at once and shows the resting state for `current`
+ function settle(){
+ timers.forEach(clearTimeout);timers=[];wayBack=0;afterMove=null;
+ animating=false;
+ showPage(current);
+ }
+
+ // pt is the click (see spot); the circle starts there, in the middle or in the bottom-right corner, as the setting says
+ function navigate(next,pt,then){
+ if(next===current||animating)return;
+ const prev=current;current=next;updateNav(next);
+ afterMove=then||null;animating=true;
+ const oldEl=pages[prev],newEl=pages[next];
+ newEl.classList.add('active'); // both pages are on show while the circle changes
+ if(!motionOk){
+ // Reduced motion: the new page fades in over the old one, nothing grows
+ newEl.style.zIndex='2';newEl.style.opacity='0';newEl.offsetHeight;
+ newEl.style.transition='opacity 300ms linear';newEl.style.opacity='1';
+ later(()=>{rest(oldEl,false);rest(newEl,true);finish()},350);
+ return;
+ }
+ const w=area.clientWidth,h=area.clientHeight;
+ const x=origin==='center'?w/2:origin==='corner'?w:pt.x,y=origin==='center'?h/2:origin==='corner'?h:pt.y;
+ // Big enough to reach the farthest corner, so no corner is left uncovered
+ const far=Math.ceil(Math.max(Math.hypot(x,y),Math.hypot(w-x,y),Math.hypot(x,h-y),Math.hypot(w-x,h-y)));
+ // Going to an earlier page with Closes on: the old page stays on top and shrinks into the spot instead
+ const closing=closeTog.checked&&next<prev,top=closing?oldEl:newEl,at=`px at ${x.toFixed(1)}px ${y.toFixed(1)}px)`;
+ const d=dur*(slowTog.checked?3:1); // read when the change starts; three times as long in slow motion
+ top.style.zIndex='2';top.style.transition='none';top.style.clipPath='circle('+(closing?far:0)+at;
+ top.offsetHeight; // commit the starting circle before the change is switched on
+ top.style.transition=`clip-path ${d}ms cubic-bezier(.4,0,.2,1)`;
+ top.style.clipPath='circle('+(closing?0:far)+at;
+ later(()=>{rest(oldEl,false);rest(newEl,true);finish()},d+50);
+ }
+
+ // A click of Show me: the ring marks its spot, and the change starts from there a moment later
+ function pretend(pt,next,then){
+ if(motionOk){
+ tapEl.style.translate=`${(pt.x+area.offsetLeft).toFixed(1)}px ${(pt.y+area.offsetTop).toFixed(1)}px`;
+ tapEl.classList.remove('on');tapEl.offsetWidth;tapEl.classList.add('on');
+ }
+ wayBack=later(()=>{wayBack=0;navigate(next,pt,then)},motionOk?250:0);
+ }
+ // Show me: a click on the page opens the next one, a hold of 1200ms, then a click on the first page's name goes back
+ function showMe(){
+ settle();
+ const start=current;
+ pretend({x:area.clientWidth*.7,y:area.clientHeight*.62},(start+1)%PAGES.length,()=>{wayBack=later(()=>pretend(spot(null,navBtns[start]),start),1200)});
+ }
+ function reset(){current=0;settle()}
+
+ document.getElementById('btn-demo').addEventListener('click',showMe);
+ document.getElementById('btn-reset').addEventListener('click',reset);
+ // The visitor took over: cancel what the run has not started yet. A circle already under way finishes on its own.
+ document.addEventListener('hb:input',()=>{afterMove=null;cancel(wayBack);wayBack=0});
+
+ function choices(id,pick){
+ const buttons=document.querySelectorAll('#'+id+' button');
+ buttons.forEach(b=>b.addEventListener('click',()=>{
+ buttons.forEach(x=>{x.classList.toggle('on',x===b);x.setAttribute('aria-pressed',String(x===b))});
+ pick(b.dataset);
+ }));
+ }
+ choices('origin-seg',d=>{origin=d.origin});
+ choices('speed-seg',d=>{dur=+d.ms});
+ showPage(0);
+</script>
+</body>
+</html>
diff --git a/animations/03-page-transitions/flip-technique/index.html b/animations/03-page-transitions/flip-technique/index.html
index b3ae4f69..1206b181 100644
--- a/animations/03-page-transitions/flip-technique/index.html
+++ b/animations/03-page-transitions/flip-technique/index.html
@@ -58,7 +58,7 @@
<body class="hb" data-hb-kind="do" data-hb-autoplay>
<nav class="hb-bar" aria-label="Animation Handbook">
<a class="hb-home" href="../../../"><svg class="hb-mark" viewBox="0 0 32 32" aria-hidden="true"><g class="g"><circle cx="11.16" cy="20.84" r="6.1"/><circle cx="15.12" cy="16.88" r="6.1"/><circle cx="18.51" cy="13.49" r="6.1"/></g><circle class="b" cx="21.2" cy="10.8" r="6.6"/></svg><span>Animation Handbook</span></a>
- <span class="hb-pager"><a href="../dissolve/" rel="prev" aria-label="Previous: Dissolve Transition"><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="m15 18-6-6 6-6"/></svg><span><span class="hb-dir">Previous: </span>Dissolve Transition</span></a></span>
+ <span class="hb-pager"><a href="../dissolve/" rel="prev" aria-label="Previous: Dissolve Transition"><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="m15 18-6-6 6-6"/></svg><span><span class="hb-dir">Previous: </span>Dissolve Transition</span></a><a href="../circle-reveal/" rel="next" aria-label="Next: Circle Reveal"><span><span class="hb-dir">Next: </span>Circle Reveal</span><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg></a></span>
</nav>
<main class="hb-page">
<header class="hb-head">
diff --git a/index.html b/index.html
index e2d7eb15..466fd9b2 100644
--- a/index.html
+++ b/index.html
@@ -617,6 +617,17 @@ button,input{font:inherit;color:inherit}
.pv-flip .s1{left:14%;top:20%}.pv-flip .s2{left:60%;top:54%}
.pv-flip .el{position:absolute;width:26%;height:26%;border-radius:6px;background:var(--accent);animation:p-flip 3s var(--ease) infinite}
@keyframes p-flip{0%,20%{left:14%;top:20%}55%,80%{left:60%;top:54%}100%{left:14%;top:20%}}
+.pv-circlerev{background:#0c0d12;position:relative;overflow:hidden}
+.pv-circlerev .pg{position:absolute;left:14%;right:34%;top:38%;display:flex;flex-direction:column;gap:9px}
+.pv-circlerev .pg b{height:8px;border-radius:2px;background:color-mix(in srgb,var(--accent) 24%,#1c1e26)}
+.pv-circlerev .pg b:first-child{width:64%;height:14px}.pv-circlerev .pg b:last-child{width:82%}
+.pv-circlerev .pb b{background:var(--accent)}
+.pv-circlerev .c{position:absolute;left:66%;top:64%;width:160%;aspect-ratio:1;border-radius:50%;background:color-mix(in srgb,var(--accent) 24%,#0f1016);transform:translate(-50%,-50%) scale(0);animation:p-circ 3.6s cubic-bezier(.4,0,.2,1) infinite}
+.pv-circlerev .pb{animation:p-circb 3.6s ease infinite}
+.pv-circlerev .t{position:absolute;left:66%;top:64%;width:12%;aspect-ratio:1;border-radius:50%;border:1.5px solid #fff;opacity:0;transform:translate(-50%,-50%) scale(.4);animation:p-ctap 3.6s ease-out infinite}
+@keyframes p-circ{0%,14%{transform:translate(-50%,-50%) scale(0);opacity:1}54%,86%{transform:translate(-50%,-50%) scale(1);opacity:1}100%{transform:translate(-50%,-50%) scale(1);opacity:0}}
+@keyframes p-circb{0%,40%{opacity:0}56%,86%{opacity:1}100%{opacity:0}}
+@keyframes p-ctap{0%,4%{opacity:0;transform:translate(-50%,-50%) scale(.4)}10%{opacity:.9}24%,100%{opacity:0;transform:translate(-50%,-50%) scale(1.5)}}
/* ── bespoke: 04 Micro-Interactions ── */
.pv-hoverbtn,.pv-press{background:#08090c;display:grid;place-items:center}
@@ -1007,7 +1018,7 @@ button,input{font:inherit;color:inherit}
<section class="wrap home-hero" aria-labelledby="hero-title">
<span class="float fl1" aria-hidden="true"></span><span class="float fl2" aria-hidden="true"></span><span class="float fl3" aria-hidden="true"></span>
<span class="float fl4" aria-hidden="true"></span><span class="float fl5" aria-hidden="true"></span><span class="float fl6" aria-hidden="true"></span>
- <p class="pill"><span class="pill-dot" aria-hidden="true"></span>129 free animations · no coding needed</p>
+ <p class="pill"><span class="pill-dot" aria-hidden="true"></span>130 free animations · no coding needed</p>
<h1 class="h1" id="hero-title">What do you want to animate?</h1>
<p class="sub">Pick a place, or describe it in your own words. Every animation plays live, and each one comes with a ready-made prompt for your AI assistant.</p>
<form class="search" id="search-form" role="search" action="./" method="get">
@@ -1064,8 +1075,8 @@ button,input{font:inherit;color:inherit}
<p class="empty-s">Try a simpler word, or pick one of these:</p>
<p class="pop"><button type="button" data-q="fade in">fade in</button><button type="button" data-q="typing text">typing text</button><button type="button" data-q="loading spinner">loading spinner</button><button type="button" data-q="parallax">parallax</button><button type="button" data-q="confetti">confetti</button></p>
</div>
- <div class="more" id="more"><button type="button" class="bigbtn" id="more-btn"><span id="more-label">Browse all 129 animations</span><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M6 13l6 6 6-6"/></svg></button></div>
- <noscript><p class="noscript">This page shows its animations with JavaScript. All 129 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>
+ <div class="more" id="more"><button type="button" class="bigbtn" id="more-btn"><span id="more-label">Browse all 130 animations</span><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M6 13l6 6 6-6"/></svg></button></div>
+ <noscript><p class="noscript">This page shows its animations with JavaScript. All 130 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="how" id="how" aria-labelledby="how-title">
@@ -1083,7 +1094,7 @@ button,input{font:inherit;color:inherit}
<footer class="wrap foot">
<a class="brand" href="./"><svg class="mark" viewBox="0 0 32 32" aria-hidden="true"><circle class="ring" cx="11.16" cy="20.84" r="6.1"/><circle class="ring" cx="15.12" cy="16.88" r="6.1"/><circle class="ring" cx="18.51" cy="13.49" r="6.1"/><circle class="ball" cx="21.2" cy="10.8" r="6.6"/></svg><span>Animation Handbook</span></a>
- <p class="foot-t">129 web animations with live demos and copyable prompts.</p>
+ <p class="foot-t">130 web animations with live demos and copyable prompts.</p>
<nav class="nav" aria-label="Footer"><a class="lnk" href="https://github.com/matinmonshizadeh/animation-handbook" target="_blank" rel="noopener noreferrer">GitHub</a><a class="lnk" href="#top">Back to top</a></nav>
</footer>
<div class="toast" id="toast" role="status" aria-live="polite"><span class="ok" aria-hidden="true"><svg class="i" viewBox="0 0 24 24"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span><span class="toast-t"></span></div>
@@ -1169,6 +1180,7 @@ const CATS=[
['portal-zoom','Portal / Tunnel Zoom','The next page opens out of a circle you click. Best for big reveals.'],
['dissolve','Dissolve','The page breaks into tiles that give way to the next. Best for photo galleries.'],
['flip-technique','FLIP Technique','Cards glide to their new places when the layout changes. Best for sorting lists.'],
+ ['circle-reveal','Circle Reveal','The next page grows in a circle from the spot you click. Best for app-style navigation.'],
]
},
{
@@ -1297,6 +1309,7 @@ const PV={
'view-transitions-api':'vt','shared-element-transition':'shared','morph-transition':'morph','crossfade':'xfade',
'slide-transition':'slidepage','zoom-transition':'zoompage','flash-transition':'flash','blur-transition':'blurpage',
'elastic-transition':'elastic','portal-zoom':'portal','dissolve':'dissolve','flip-technique':'flip',
+ 'circle-reveal':'circlerev',
'click-ripple':'ripple','loading-spinner':'spinner','shimmer-effect':'shimmer','skeleton-loader':'shimmer',
'hover-state':'hoverbtn','focus-ring':'focusring','button-press-scale':'press','toggle-switch':'toggle',
'progress-animation':'segbar','checkmark-draw':'check','form-field-morph':'floatlabel','badge-pulse':'badge',
@@ -1375,6 +1388,7 @@ const PLACES={
'portal-zoom':['page'],
'dissolve':['page','imgcard'],
'flip-technique':['page','imgcard'],
+ 'circle-reveal':['page'],
// 04
'hover-state':['btn','imgcard'],
'click-ripple':['btn'],
@@ -1466,6 +1480,7 @@ function pvMarkup(k){
case 'sig1': return '<div class="s1 anim">'+'<b></b>'.repeat(9)+'</div>';
case 'sig2': return '<span class="s2 anim"></span>';
case 'sig3': return '<span class="s3 pa anim"></span><span class="s3 pb anim"></span>';
+ case 'circlerev': return '<span class="pg"><b></b><b></b><b></b></span><span class="c anim"></span><span class="pg pb anim"><b></b><b></b><b></b></span><span class="t anim"></span>';
case 'sig4': return '<span class="s4r anim"></span><span class="s4r r2 anim"></span><span class="s4r r3 anim"></span><span class="s4d"></span>';
case 'sig5': return '<span class="s5 anim"></span><span class="s5 anim"></span><span class="s5 anim"></span>';
case 'sig6': return '<div class="cube anim"><span class="face f1"></span><span class="face f2"></span><span class="face f3"></span><span class="face f4"></span><span class="face f5"></span><span class="face f6"></span></div>';
@@ -1746,7 +1761,7 @@ let shown=[];
// under the place label or between two states). Nothing here runs without reduced motion.
const STILL={
cover:.1,curtain:.6,kinetic:.25,carousel:.1,typewriter:.55,textclip:.7,svgpath:.7,smoke:.3,leak:.7,
- flash:.41,blurpage:.2,toggle:.7,shake:.8
+ flash:.41,blurpage:.2,toggle:.7,shake:.8,circlerev:.25
};
function hold(card){
const anims=card.querySelector('.pv').getAnimations({subtree:true});
diff --git a/sitemap.xml b/sitemap.xml
index 23cc35d9..cd8d69eb 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -52,6 +52,7 @@
<url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/portal-zoom/</loc><lastmod>2026-07-14</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
<url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/dissolve/</loc><lastmod>2026-07-14</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
<url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/flip-technique/</loc><lastmod>2026-07-14</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/circle-reveal/</loc><lastmod>2026-10-01</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
<url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/hover-state/</loc><lastmod>2026-07-14</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
<url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/click-ripple/</loc><lastmod>2026-07-14</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
<url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/focus-ring/</loc><lastmod>2026-07-14</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>