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: move Shared Element Transition's copy with a transform, hide its closed detail view and keep a tabbing visitor in control

matin9298976c6755
diff --git a/animations/03-page-transitions/shared-element-transition/README.md b/animations/03-page-transitions/shared-element-transition/README.md
index 20c1bfc0..fcf939c5 100644
--- a/animations/03-page-transitions/shared-element-transition/README.md
+++ b/animations/03-page-transitions/shared-element-transition/README.md
@@ -10,28 +10,29 @@ A shared element transition keeps one piece of content in view while the page ch
- Mobile app-style navigation where spatial continuity aids orientation
## How it works
-FLIP stands for First, Last, Invert, Play. Record the thumbnail's rectangle (First), reveal the destination and read the hero's rectangle (Last), position a fixed clone at the start rect, then transition it to the end rect (Invert then Play):
+FLIP stands for First, Last, Invert, Play. Record the thumbnail's rectangle (First), reveal the destination and read the hero's rectangle (Last), place a fixed copy on the header's rectangle and draw it back onto the thumbnail with a transform (Invert), then transition that transform to none (Play):
```js
function openDetail(i){
const thumbRect = thumbEls[i].getBoundingClientRect(); // FIRST
detail.classList.add('active');
const heroRect = detailHero.getBoundingClientRect(); // LAST
- // place clone at the thumb's position/size
+ // INVERT: the copy sits on the header's rectangle; a transform draws it back onto the thumbnail
+ const sx = thumbRect.width / heroRect.width, sy = thumbRect.height / heroRect.height;
flipEl.style.cssText =
- `background:${p.bg};width:${thumbRect.width}px;height:${thumbRect.height}px;`+
- `top:${thumbRect.top}px;left:${thumbRect.left}px;transition:none;display:block`;
- void flipEl.offsetWidth; // commit the start rect
- flipEl.style.transition = `all ${dur}ms ${ease}`; // PLAY
- flipEl.style.top = heroRect.top+'px';
- flipEl.style.left = heroRect.left+'px';
- flipEl.style.width = heroRect.width+'px';
- flipEl.style.height = heroRect.height+'px';
+ `background:${p.bg};top:${heroRect.top}px;left:${heroRect.left}px;`+
+ `width:${heroRect.width}px;height:${heroRect.height}px;transform-origin:0 0;`+
+ `transform:translate(${thumbRect.left-heroRect.left}px,${thumbRect.top-heroRect.top}px) scale(${sx},${sy});`+
+ `border-radius:${10/sx}px/${10/sy}px;transition:none;display:block`;
+ void flipEl.offsetWidth; // commit the inverted start
+ flipEl.style.transition = // PLAY
+ `transform ${dur}ms ${ease},border-radius ${dur}ms ${ease}`;
+ flipEl.style.transform = 'none';
flipEl.style.borderRadius = '0';
}
```
-The real grid fades out while the clone travels, and the detail body fades in slightly later (`dur*0.6` delay) so the hero has arrived before its text appears. Reading `offsetWidth` after placing the clone makes the browser apply the start rect before the transition is switched on — without it the clone would jump straight to the end.
+The real grid fades out while the copy travels, and the detail body fades in slightly later (`dur*0.6` delay) so the hero has arrived before its text appears. Reading `offsetWidth` after placing the copy makes the browser apply the inverted start before the transition is switched on — without it the copy would jump straight to the end. The corners are set to `10/sx` by `10/sy` so they still look 10px round while the copy is shrunk.
## Key parameters
| Parameter | Default | Effect |
@@ -41,10 +42,10 @@ The real grid fades out while the clone travels, and the detail body fades in sl
## Production notes
- **Read then write** — batch all `getBoundingClientRect()` reads before you touch styles. Interleaving reads and writes causes layout thrashing that stutters the animation.
-- **The clone is `position:fixed`**, so it moves in viewport coordinates and ignores the scroll and layout of the pages underneath it. It animates `top`, `left`, `width` and `height`, which is cheap enough for one element; to move many elements, animate `transform` instead, as the FLIP Technique demo does.
+- **The clone is `position:fixed`**, so it moves in viewport coordinates and ignores the scroll and layout of the pages underneath it. It moves with `transform` alone (a shift and a scale), so the browser lays nothing out while it travels; only its corners are repainted. A scaled copy stretches what is inside it, which suits a picture or a colour but not text.
- **Fixed positioning uses viewport coordinates**, which is why the demo reads `getBoundingClientRect()` directly. If your clone lives inside a transformed or scrolled ancestor, offsets must be adjusted.
- **Reduced motion** skips the clone entirely and snaps the detail view in.
-- **Library equivalents**: the View Transitions API does this natively by giving both elements the same `view-transition-name`. Framer Motion's `layoutId` and shared `<motion.*>` elements automate FLIP; Next.js and GSAP's Flip plugin offer the same measure-invert-play primitive.
+- **Library equivalents**: the View Transitions API does this natively by giving both elements the same `view-transition-name`. Framer Motion's `layoutId` and shared `<motion.*>` elements automate FLIP; GSAP's Flip plugin offers the same measure-invert-play primitive.
## See also
- [View Transitions API](../view-transitions-api/) — the browser can do this itself
diff --git a/animations/03-page-transitions/shared-element-transition/index.html b/animations/03-page-transitions/shared-element-transition/index.html
index afe95909..133daafd 100644
--- a/animations/03-page-transitions/shared-element-transition/index.html
+++ b/animations/03-page-transitions/shared-element-transition/index.html
@@ -79,7 +79,7 @@
</div>
<div class="page-area" id="page-area">
<div id="page-grid"></div>
- <div id="page-detail">
+ <div id="page-detail" inert>
<div id="detail-hero"></div>
<div id="detail-body">
<div id="detail-title">Project Name</div>
@@ -129,7 +129,7 @@
<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 shared element transition to [your list of items and their detail pages]. When a visitor opens an item, its picture should grow from its place in the list into the large header of the detail page, while the list fades away and the detail text fades in just after the picture lands. Measure where the picture starts and where it ends, put a copy at the start, and move the copy to the end, so it reads as one continuous element. Going back fades the detail page out and the list back in. If the visitor has reduced motion turned on, open and close the detail page without the movement. Match the settings listed below.</p>
+ <p class="hb-prompt">Add a shared element transition to [your list of items and their detail pages]. When a visitor opens an item, its picture should grow from its place in the list into the large header of the detail page, while the list fades away and the detail text fades in just after the picture lands. Measure where the picture starts and where it ends, then move a copy from one to the other with a transform only, never by changing its position or size, so it reads as one continuous element. Going back fades the detail page out and the list back in. If the visitor has reduced motion turned on, open and close the detail page without the movement. 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>
@@ -173,7 +173,7 @@
const flipEl=document.getElementById('flip-el'),navBack=document.getElementById('nav-back'),navTitle=document.getElementById('nav-title');
const slowTog=document.getElementById('slow-tog');
const motionOk=!window.matchMedia('(prefers-reduced-motion:reduce)').matches;
- let dur=500,ease='cubic-bezier(.2,.7,.3,1)',animating=false,currentView='grid',openIndex=0,afterMove=null,closeTimer=0,timers=[];
+ let dur=500,ease='cubic-bezier(.2,.7,.3,1)',animating=false,currentView='grid',openIndex=0,afterMove=null,closeTimer=0,timers=[],ownFocus=false;
const thumbEls=PROJECTS.map((p,i)=>{
const el=document.createElement('button');el.type='button';el.className='thumb';el.style.background=p.bg;
@@ -215,23 +215,23 @@
flipEl.style.display='none';
animating=false;
}
- // The grid at once, with nothing left over from an opening or a closing
+ // The grid at once, with nothing left over from an opening or a closing: no fade too, or one already heading for its resting value would go on
function reset(){
settle();
- detail.classList.remove('active');detail.style.opacity='';detail.style.transition='';
+ detail.classList.remove('active');detail.inert=true;detail.style.opacity='';detail.style.transition='';
grid.style.opacity='';grid.style.transition='';grid.style.pointerEvents='';grid.inert=false;
- navBack.classList.remove('show');navTitle.textContent='Projects';
- currentView='grid';
+ navBack.classList.remove('show');navTitle.textContent='Projects';currentView='grid';
+ [grid,detail,navBack].forEach(el=>el.getAnimations().forEach(a=>a.cancel()));
}
- // The visitor's own opening and closing move focus with the view; Show me and Reset move none
+ // The visitor's own opening and closing move focus with the view; Show me and Reset move none. ownFocus marks these moves as the page's own.
function showDetailChrome(name,byVisitor){
navBack.classList.add('show');navTitle.textContent=name;
- if(byVisitor)navBack.focus({preventScroll:true});
+ if(byVisitor){ownFocus=true;navBack.focus({preventScroll:true});ownFocus=false}
}
function showGrid(byVisitor){
grid.inert=false;
- if(byVisitor)thumbEls[openIndex].focus({preventScroll:true});
+ if(byVisitor){ownFocus=true;thumbEls[openIndex].focus({preventScroll:true});ownFocus=false}
}
function openDetail(i,byVisitor,then){
@@ -243,21 +243,21 @@
detailHero.style.background=p.bg;detailTitle.textContent=p.name;detailTitle.style.color=p.ac;
detailSub.textContent=p.sub;detailDesc.textContent=p.desc;
// LAST: show detail to get hero rect
- detail.classList.add('active');
+ detail.classList.add('active');detail.inert=false;
const heroRect=detailHero.getBoundingClientRect();
grid.inert=true;
if(!motionOk){
detail.style.transition='none';detail.style.opacity='1';grid.style.opacity='0';grid.style.pointerEvents='none';
showDetailChrome(p.name,byVisitor);currentView='detail';finish();return;
}
- // FLIP: animate the shared element
- flipEl.style.cssText=`background:${p.bg};border-radius:10px;width:${thumbRect.width}px;height:${thumbRect.height}px;top:${thumbRect.top}px;left:${thumbRect.left}px;transition:none;display:block`;
+ // INVERT: the copy sits on the header's rectangle and a transform draws it back onto the thumbnail (corners 10px once shrunk)
+ const sx=thumbRect.width/heroRect.width,sy=thumbRect.height/heroRect.height;
+ flipEl.style.cssText=`background:${p.bg};top:${heroRect.top}px;left:${heroRect.left}px;width:${heroRect.width}px;height:${heroRect.height}px;transform-origin:0 0;transform:translate(${thumbRect.left-heroRect.left}px,${thumbRect.top-heroRect.top}px) scale(${sx},${sy});border-radius:${10/sx}px/${10/sy}px;transition:none;display:block`;
grid.style.opacity='0';grid.style.transition=`opacity ${Math.round(d*0.4)}ms ease`;
detail.style.opacity='0';
- void flipEl.offsetWidth; // commit the start rect before the transition is switched on
- flipEl.style.transition=`all ${d}ms ${ease}`;
- flipEl.style.top=heroRect.top+'px';flipEl.style.left=heroRect.left+'px';
- flipEl.style.width=heroRect.width+'px';flipEl.style.height=heroRect.height+'px';flipEl.style.borderRadius='0';
+ void flipEl.offsetWidth; // commit the inverted start before the transition is switched on
+ flipEl.style.transition=`transform ${d}ms ${ease},border-radius ${d}ms ${ease}`; // PLAY: only the transform and the corners animate, so nothing is laid out while the copy travels
+ flipEl.style.transform='none';flipEl.style.borderRadius='0';
detail.style.transition=`opacity ${Math.round(d*0.4)}ms ease ${Math.round(d*0.6)}ms`;
detail.style.opacity='1';
later(()=>{
@@ -273,12 +273,12 @@
const d=scaled();
navBack.classList.remove('show');navTitle.textContent='Projects';
if(!motionOk){
- detail.classList.remove('active');detail.style.opacity='0';grid.style.opacity='1';grid.style.pointerEvents='auto';
+ detail.classList.remove('active');detail.inert=true;detail.style.opacity='0';grid.style.opacity='1';grid.style.pointerEvents='auto';
showGrid(byVisitor);currentView='grid';finish();return;
}
detail.style.transition=`opacity ${Math.round(d*0.3)}ms ease`;detail.style.opacity='0';
later(()=>{
- detail.classList.remove('active');grid.style.opacity='1';grid.style.transition=`opacity ${Math.round(d*0.4)}ms ease`;grid.style.pointerEvents='auto';
+ detail.classList.remove('active');detail.inert=true;grid.style.opacity='1';grid.style.transition=`opacity ${Math.round(d*0.4)}ms ease`;grid.style.pointerEvents='auto';
showGrid(byVisitor);currentView='grid';finish();
},Math.round(d*0.3)+50);
}
@@ -294,6 +294,8 @@
document.getElementById('btn-reset').addEventListener('click',reset);
// The visitor took over: cancel the close the run has not started yet. An opening already under way finishes.
document.addEventListener('hb:input',()=>{afterMove=null;cancel(closeTimer);closeTimer=0});
+ // A visitor who tabs into the box takes over too; the page's own focus moves (ownFocus) do not count.
+ document.querySelector('.stage').addEventListener('focusin',e=>{if(e.isTrusted&&!ownFocus){afterMove=null;cancel(closeTimer);closeTimer=0}});
function choices(id,pick){
const buttons=document.querySelectorAll('#'+id+' button');
diff --git a/docs/superpowers/plans/2026-09-29-transitions-content.md b/docs/superpowers/plans/2026-09-29-transitions-content.md
index c706303b..84b798b2 100644
--- a/docs/superpowers/plans/2026-09-29-transitions-content.md
+++ b/docs/superpowers/plans/2026-09-29-transitions-content.md
@@ -163,24 +163,25 @@ Eight demos put an element in its starting state with `transition:none` and star
- 1200ms after the opening ends (the `dur+50` timer that hides the copy and shows Back), the run closes the detail view the way Back does.
- This takes about 2.3s.
- `hb:input` cancels the pending close. An opening already under way finishes.
-- **Reset:** yes. The grid at once: the copy is hidden, the detail view closed and its inline `opacity` and `transition` cleared, the grid's inline `opacity`, `transition` and `pointer-events` cleared (so it shows and takes clicks again) and its `inert` removed, the title back to "Projects" and Back hidden.
+ - So does a trusted `focusin` inside the stage that the page did not cause: a keyboard visitor who tabs from Show me back to Back during the hold takes over, so the close no longer hides Back under them (which dropped their focus to `<body>`). The page's own two `focus()` calls, Back after an opening and the project after Back, are wrapped in an `ownFocus` flag (`{ownFocus=true;….focus({preventScroll:true});ownFocus=false}`) and do not count, since a programmatic focus is a trusted `focusin` too.
+- **Reset:** yes. The grid at once: the copy is hidden, the detail view closed and `inert` again, its inline `opacity` and `transition` cleared, the grid's inline `opacity`, `transition` and `pointer-events` cleared (so it shows and takes clicks again) and its `inert` removed, the title back to "Projects" and Back hidden. The fades still running on the grid, the detail view and Back are cancelled (`getAnimations()`, then `cancel()`): a fade already heading for its resting value keeps going when its inline `transition` is cleared.
- **Slow motion:** multiplies `dur` by 3 wherever it is used: the copy's travel, the grid's fade (0.4 × `dur`), the detail's fade and its delay (0.4 and 0.6 × `dur`), the close fade (0.3 × `dur`), and the matching parts of the `dur+50` and `0.3×dur+50` timers.
- **Reduced motion:** the demo's `motionOk` branches open and close the detail view at once, and the rule `#flip-el{transition:none!important}` stays. Show me opens Lumen and closes it again with no movement.
- **Stage font:** site font.
- **Stage:**
- The mini nav (Back and the title) and the page area (grid, detail view and the moving copy `#flip-el`) stay.
- - **Special case:** the copy is `position:fixed` and moves in viewport coordinates, so the stage's `overflow:hidden` does not clip it. The conversion must not give the stage or any of its ancestors a `transform`, `filter`, `backdrop-filter`, `perspective`, a `will-change` naming one of these, or `contain` with `layout` or `paint`: any of them would become the copy's containing block and shift or clip it. `container-type` and `contain:size` or `style` do not make one in Chrome; leave them off too, simply because the stage needs no containment. The copy keeps its own `will-change:transform`.
+ - **Special case:** the copy is `position:fixed` and moves in viewport coordinates, so the stage's `overflow:hidden` does not clip it. The conversion must not give the stage or any of its ancestors a `transform`, `filter`, `backdrop-filter`, `perspective`, a `will-change` naming one of these, or `contain` with `layout` or `paint`: any of them would become the copy's containing block and shift or clip it. `container-type` and `contain:size` or `style` do not make one in Chrome; leave them off too, simply because the stage needs no containment. The copy keeps its own `will-change:transform`. **The copy moves with a `transform` only,** because CLAUDE.md rules out animating `top`, `left`, `width` and `height`. It is placed on the header's rectangle with `transform-origin:0 0`; a `translate` and a `scale` draw it back onto the thumbnail (INVERT), and the transition plays that transform to `none` (PLAY) together with `border-radius`, which starts at `10/sx` by `10/sy` (the scale factors) so the corners look 10px round while the copy is shrunk, and ends at 0. The copy starts and ends on the same rectangles as the `top`/`left`/`width`/`height` version it replaces (0px difference at six screen sizes) and reaches the same Springy peak (1007×142 against the 958×141 header at 1280×800); a trip costs 2 or 3 layouts instead of about 32 (375×812, CPU slowed 4×).
- `#flip-el`'s `z-index:100` becomes `40`: above the stage's content, below the site's sticky top bar (50), so a stage scrolled partly under the bar does not draw the copy over it (owner decision).
- `.nav-back` becomes 13px text, `min-height:44px` at every size, in `var(--ui-muted)`. `.nav-title` becomes 13px. The unused `.nav-label` rule goes.
- **The projects become buttons, so a keyboard can open them.** Today each thumbnail is a `div` with a click listener, which a keyboard cannot reach on a "Click it" page.
- Each becomes `<button type="button" class="thumb">`. `.thumb` adds `border:0;font:inherit;color:inherit;text-align:left;cursor:pointer`.
- Its two lines become `<span class="thumb-label">` and `<span class="thumb-sub">` with `display:block`, because a button may only hold inline content.
- - Hidden controls leave the Tab order. While the detail view is open, the grid gets `inert` (removed when the grid shows again). `.nav-back` adds `visibility:hidden` and `transition:opacity .2s,visibility 0s .2s`: when hidden it fades out, then leaves the Tab order, so it is not an invisible Tab stop in the grid view. `.nav-back.show` gets `visibility:visible;transition:opacity .2s`, so Back is visible, and can take focus, the moment `show` is added. A visibility transition on showing would keep Back hidden for about two frames, and `focus()` in the same step would silently fail. Under reduced motion that same step is the only chance (checked in Chrome).
+ - Hidden controls leave the Tab order. While the detail view is open, the grid gets `inert` (removed when the grid shows again). `.nav-back` adds `visibility:hidden` and `transition:opacity .2s,visibility 0s .2s`: when hidden it fades out, then leaves the Tab order, so it is not an invisible Tab stop in the grid view. `.nav-back.show` gets `visibility:visible;transition:opacity .2s`, so Back is visible, and can take focus, the moment `show` is added. A visibility transition on showing would keep Back hidden for about two frames, and `focus()` in the same step would silently fail. Under reduced motion that same step is the only chance (checked in Chrome). The closed detail view is `inert` too (set in the markup, removed when a project opens, set again when the detail view closes and on Reset), so a screen reader does not read its placeholder text or the last project's text.
- Focus follows the view. When the visitor opens a project, by click or by key, focus moves to Back once it shows (`focus({preventScroll:true})`). Back returns focus to that project's button once the grid shows. A mouse click gets no focus ring, because the browser shows the ring only after keyboard use. Show me and Reset move no focus.
- `.thumb-sub` goes from `opacity:.5` to `.8`: 3.0:1 becomes 5.1:1 on the thumbnails.
- Two thumbnail title colours change so the 11px titles read on their thumbnails, and the detail view's title uses the same colours: Atlas `#79c0ff` becomes `#a5d6ff` (4.49:1 becomes 5.7:1), and Prism `#56d364` becomes `#7ee787` (4.1:1 becomes 5.1:1).
- Unused variables: `--dur` and `--ease` go.
- - Default height: the grid and the longest detail text fit the 233px page area on a 320px phone.
+ - Default height: the grid and the longest detail text fit the 233px page area on a 320px phone. On small stages, `@media(max-height:640px),(max-width:600px){#detail-body{padding:12px 16px}#detail-title{font-size:18px;margin-bottom:4px}#detail-sub{margin-bottom:6px}#detail-desc{line-height:1.5}}` tightens the text block under the header, so the header keeps its 45% share instead of being squeezed (86 of 193px at 1280×590, with 12px under the text).
**Main settings**
@@ -202,7 +203,7 @@ None: leave out the `details.hb-options` block.
- **Good for:** Galleries · Product grids · Card lists · Media libraries · **Avoid on:** Unrelated pages
- **Prompt:**
- > Add a shared element transition to [your list of items and their detail pages]. When a visitor opens an item, its picture should grow from its place in the list into the large header of the detail page, while the list fades away and the detail text fades in just after the picture lands. Measure where the picture starts and where it ends, put a copy at the start, and move the copy to the end, so it reads as one continuous element. Going back fades the detail page out and the list back in. If the visitor has reduced motion turned on, open and close the detail page without the movement. Match the settings listed below.
+ > Add a shared element transition to [your list of items and their detail pages]. When a visitor opens an item, its picture should grow from its place in the list into the large header of the detail page, while the list fades away and the detail text fades in just after the picture lands. Measure where the picture starts and where it ends, then move a copy from one to the other with a transform only, never by changing its position or size, so it reads as one continuous element. Going back fades the detail page out and the list back in. If the visitor has reduced motion turned on, open and close the detail page without the movement. Match the settings listed below.
- **README What it is:** rewritten:
@@ -221,23 +222,29 @@ None: leave out the `details.hb-options` block.
- [Portal / Tunnel Zoom](../portal-zoom/) — the next page opens out of a clicked circle
- [Morph Transition](../morph-transition/) — a shape changes instead of moving
- **README How it works:**
- - In the snippet, replace the `requestAnimationFrame(()=>requestAnimationFrame(()=>{ … }));` wrapper with a reflow. The lines that were inside it follow directly, with `easeSel.value` becoming `ease`:
+ - The first paragraph ends "…(Last), place a fixed copy on the header's rectangle and draw it back onto the thumbnail with a transform (Invert), then transition that transform to none (Play):".
+ - The snippet follows the page's code, with the `requestAnimationFrame` wrapper replaced by a reflow and `easeSel.value` written `ease`. After `heroRect` it inverts, commits the inverted start and plays:
```js
- void flipEl.offsetWidth; // commit the start rect
- flipEl.style.transition = `all ${dur}ms ${ease}`; // PLAY
- flipEl.style.top = heroRect.top+'px';
- flipEl.style.left = heroRect.left+'px';
- flipEl.style.width = heroRect.width+'px';
- flipEl.style.height = heroRect.height+'px';
+ // INVERT: the copy sits on the header's rectangle; a transform draws it back onto the thumbnail
+ const sx = thumbRect.width / heroRect.width, sy = thumbRect.height / heroRect.height;
+ flipEl.style.cssText =
+ `background:${p.bg};top:${heroRect.top}px;left:${heroRect.left}px;`+
+ `width:${heroRect.width}px;height:${heroRect.height}px;transform-origin:0 0;`+
+ `transform:translate(${thumbRect.left-heroRect.left}px,${thumbRect.top-heroRect.top}px) scale(${sx},${sy});`+
+ `border-radius:${10/sx}px/${10/sy}px;transition:none;display:block`;
+ void flipEl.offsetWidth; // commit the inverted start
+ flipEl.style.transition = // PLAY
+ `transform ${dur}ms ${ease},border-radius ${dur}ms ${ease}`;
+ flipEl.style.transform = 'none';
flipEl.style.borderRadius = '0';
```
- - In the first paragraph, "then on the next frame transition it to the end rect" becomes "then transition it to the end rect".
- - The sentence "The double `requestAnimationFrame` guarantees the browser paints the start rect before the transition begins — without it the clone would jump straight to the end." becomes "Reading `offsetWidth` after placing the clone makes the browser apply the start rect before the transition is switched on — without it the clone would jump straight to the end."
-- **README Production notes:** the second bullet is wrong about how the copy moves: it animates `top`, `left`, `width` and `height`, not a transform. It becomes: "**The clone is `position:fixed`**, so it moves in viewport coordinates and ignores the scroll and layout of the pages underneath it. It animates `top`, `left`, `width` and `height`, which is cheap enough for one element; to move many elements, animate `transform` instead, as the FLIP Technique demo does." The rest is unchanged.
+ - The paragraph after it says "copy" throughout and ends: "Reading `offsetWidth` after placing the copy makes the browser apply the inverted start before the transition is switched on — without it the copy would jump straight to the end. The corners are set to `10/sx` by `10/sy` so they still look 10px round while the copy is shrunk."
+- **README Production notes:** the second bullet and the library line change, because the copy moves with a transform. The second bullet becomes: "**The clone is `position:fixed`**, so it moves in viewport coordinates and ignores the scroll and layout of the pages underneath it. It moves with `transform` alone (a shift and a scale), so the browser lays nothing out while it travels; only its corners are repainted. A scaled copy stretches what is inside it, which suits a picture or a colour but not text." The library line ends "…automate FLIP; GSAP's Flip plugin offers the same measure-invert-play primitive." (it used to name Next.js, which has no such primitive). The rest is unchanged.
- **Category line:** `03.02 · Page Transitions`
- **Pager:** Previous: View Transitions API (`../view-transitions-api/`) · Next: Morph Transition (`../morph-transition/`)
+- **Final fix wave:** the closed detail view is `inert`; Reset cancels running fades; the copy moves with a `transform` instead of `top`, `left`, `width` and `height` (CLAUDE.md), with the same look; a trusted `focusin` the page did not cause stops a Show me run, with an `ownFocus` flag around the page's own focus moves; the prompt and the README say the copy moves with a transform only.
---