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.
HTML ai-promptsanimationcss-animationsfrontendgithub-pagesjavascriptmicrointeractionsmotion-designno-dependenciesreferencescroll-animationui-animationweb-animationweb-developmentwebgl
feat: SEO/AGO overhaul, site enhancements, rename to Animation Handbook, +11 techniques (124 total)
matina8e65500a792
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.ymlnew file mode 100644index 00000000..bf692036--- /dev/null+++ b/.github/ISSUE_TEMPLATE/bug_report.yml@@ -0,0 +1,35 @@+name: Bug report+description: A demo is broken, renders wrong, or misbehaves on some device/browser.+title: "[bug] "+labels: ["bug"]+body:+ - type: input+ id: which+ attributes:+ label: Which demo?+ description: Folder path or name, e.g. animations/01-scroll-based/parallax-scrolling+ placeholder: animations/<category>/<slug>+ validations:+ required: true+ - type: textarea+ id: what+ attributes:+ label: What's wrong?+ description: What did you expect, and what happened instead?+ validations:+ required: true+ - type: input+ id: env+ attributes:+ label: Browser / device+ placeholder: e.g. Safari 17 on iPhone 13, Chrome 120 on Windows+ validations:+ required: true+ - type: textarea+ id: repro+ attributes:+ label: Steps to reproduce+ placeholder: |+ 1. Open the demo+ 2. Scroll / click / resize to ...+ 3. See ...diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.ymlnew file mode 100644index 00000000..cc9a6ef7--- /dev/null+++ b/.github/ISSUE_TEMPLATE/config.yml@@ -0,0 +1,5 @@+blank_issues_enabled: true+contact_links:+ - name: Browse the live handbook+ url: https://matinmonshizadeh.github.io/animation-handbook/+ about: See all 113 techniques running before filing an issue.diff --git a/.github/ISSUE_TEMPLATE/new_technique.yml b/.github/ISSUE_TEMPLATE/new_technique.ymlnew file mode 100644index 00000000..09f6f693--- /dev/null+++ b/.github/ISSUE_TEMPLATE/new_technique.yml@@ -0,0 +1,47 @@+name: New technique+description: Propose a new animation technique to add to the handbook.+title: "[technique] "+labels: ["new technique"]+body:+ - type: input+ id: name+ attributes:+ label: Technique name+ placeholder: e.g. Pull to refresh+ validations:+ required: true+ - type: dropdown+ id: category+ attributes:+ label: Category+ options:+ - 01 Scroll-Based+ - 02 Entrance & Exit+ - 03 Page Transitions+ - 04 Micro-Interactions+ - 05 Text & Typography+ - 06 3D & Advanced+ - 07 Ambient & Background+ validations:+ required: true+ - type: textarea+ id: what+ attributes:+ label: What is it?+ description: A 2–3 sentence description of the effect and how it behaves.+ validations:+ required: true+ - type: input+ id: reference+ attributes:+ label: Reference (optional)+ description: A link to an example of this technique in the wild.+ - type: checkboxes+ id: checks+ attributes:+ label: Fit check+ options:+ - label: This is a technique, not a specific library/tool.+ required: true+ - label: It can be demonstrated with vanilla HTML/CSS/JS, no dependencies.+ required: truediff --git a/.github/pull_request_template.md b/.github/pull_request_template.mdnew file mode 100644index 00000000..80efe8a3--- /dev/null+++ b/.github/pull_request_template.md@@ -0,0 +1,21 @@+<!-- Thanks for contributing to Animation Handbook! -->++## What does this PR do?++<!-- New technique? Bug fix? Improvement to an explanation? -->++## Checklist++- [ ] One technique = one folder under `animations/<category>/<slug>/`+- [ ] Folder contains exactly `index.html` and `README.md`+- [ ] No build step, no frameworks, no external/CDN requests — runs offline+- [ ] Under ~300 lines+- [ ] README has all six sections (What it is / When / How / Key parameters / Production notes / See also)+- [ ] Registered in the root `index.html` `CATS` array and the category `README.md`+- [ ] Responsive: reflows at 375px, touch targets ≥ 44px, works with touch+- [ ] Respects `prefers-reduced-motion`+- [ ] Animates only `transform` / `opacity`++## Screenshot / GIF++<!-- Drop a short recording of the demo if you can. -->diff --git a/CLAUDE.md b/CLAUDE.mdindex c2c98a0c..3127d116 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -38,7 +38,7 @@ Every animation README has exactly these sections:3. **How it works** — the mechanic, with code snippet4. **Key parameters** — the values that matter (delay, threshold, etc.)5. **Production notes** — gotchas, library equivalents (GSAP, Framer Motion)-6. **See also** — links to related animations in the atlas+6. **See also** — links to related animations in the handbook## Taxonomy (do not invent new top-level categories without asking)@@ -51,7 +51,7 @@ Every animation README has exactly these sections:7. Ambient & Background — passive looping effects (folder: 07-ambient-background)## Distinction: technique vs tool-This atlas catalogs **techniques**, not libraries. GSAP, Framer Motion,+This handbook catalogs **techniques**, not libraries. GSAP, Framer Motion,Lottie, Three.js are tools that *implement* techniques. They get mentionedinside an entry's "Production notes" section, never as their own entry.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdnew file mode 100644index 00000000..f7379dff--- /dev/null+++ b/CONTRIBUTING.md@@ -0,0 +1,77 @@+# Contributing to Animation Handbook++Thanks for wanting to add to the handbook. The goal is a browsable, *teach-by-showing*+reference where every entry is a live demo. Contributions that add a new technique,+fix a bug, or improve an explanation are all welcome.++## Ground rules++- **One technique = one folder** under `animations/<category>/<slug>/`.+- **Each folder contains exactly** `index.html` and `README.md` (optionally a `preview.gif`/`preview.png`).+- **No build step, no frameworks, no dependencies.** Plain HTML + CSS + vanilla JS, all in one file.+- **No CDN / external requests.** If a technique needs a library in production (GSAP, Three.js),+ mention it in the README's *Production notes* — but demonstrate the principle with vanilla code.+- **Keep demos under ~300 lines.** If it's longer, the explanation has failed.+- **Must work offline.** Open the HTML in a browser and it runs.+- **This catalogs techniques, not tools.** GSAP, Framer Motion, and Lottie are tools that+ *implement* techniques. They belong in *Production notes*, never as their own entry.++## Categories (do not add new top-level categories without opening an issue first)++| Folder | Category |+|--------|----------|+| `01-scroll-based` | Scroll-driven techniques |+| `02-entrance-and-exit` | Element enter / exit / reveal |+| `03-page-transitions` | Full-page / route transitions |+| `04-micro-interactions` | Hover, click, focus, loading, UI feedback |+| `05-text-typography` | Text-specific animation |+| `06-3d-advanced` | WebGL, shaders, particles, 3D transforms |+| `07-ambient-background` | Passive looping effects |++## Adding a new technique++1. **Open an issue** using the *New technique* template so we can agree on the category and slug.+2. Create `animations/<category>/<slug>/index.html` — a self-contained demo with:+ - a `<header>` with the technique name (`<h1>`) and a one-sentence description (`<p>`);+ - a controls panel to adjust key parameters live, when relevant;+ - CSS variables for colors, dark stage / light cards by default.+3. Create `README.md` with **exactly** these six sections:+ 1. **What it is** — 2–3 sentence definition+ 2. **When to use it** — bullets of real use cases+ 3. **How it works** — the mechanic, with a code snippet+ 4. **Key parameters** — the values that matter+ 5. **Production notes** — gotchas, library equivalents+ 6. **See also** — links to related entries+4. Register the entry in the root `index.html` `CATS` array (slug, name, one-line description).+5. Add it to the category's `README.md` list.++## Responsiveness (mandatory)++Every demo must work on mobile, tablet, and desktop.++- Layouts use Grid/Flexbox with `%`, `fr`, `minmax()`, or `clamp()` — no fixed pixel widths.+- Side panels stack **below** the stage under 600px.+- Touch targets are at least **44×44px**; gate hover effects behind `@media (hover: hover)`.+- Drag interactions use Pointer Events, not mouse events.+- Animate `transform` and `opacity` only — never `width`, `height`, `top`, `left`, or `box-shadow`.+- Respect `@media (prefers-reduced-motion: reduce)`.++### Self-check before opening a PR++- [ ] Layout reflows cleanly at 375px width.+- [ ] All touch targets ≥ 44px.+- [ ] Works with touch scroll / drag, not just mouse.+- [ ] Text stays readable at every size.+- [ ] Side panel stacked below the stage on mobile.+- [ ] Respects `prefers-reduced-motion`.+- [ ] Runs offline with no external requests.++## Writing style++Prose, not bullet-soup. Show, then explain. Avoid hype ("stunning", "powerful") — describe+what it does. Comment code only where it isn't self-explanatory.++## Fixing a bug++Open an issue (or a PR directly for small fixes). Preserve every demo's behavior — visual+parity matters more than code elegance. Never combine multiple animations into one file.diff --git a/README.md b/README.mdindex 4f8eea40..f7607b44 100644--- a/README.md+++ b/README.md@@ -1,43 +1,254 @@+<div align="center">++<a href="https://matinmonshizadeh.github.io/animation-handbook/"><img src="og-image.png" alt="Animation Handbook — 124 web animation techniques with live demos" width="820"></a>+# Animation Handbook-**[Live demo →](https://matinmonshizadeh.github.io/animation-handbook/)**+**A visual reference of 124 web animation techniques — every entry is a live, dependency-free demo you can open in the browser and read how it works.**++[**Open the live handbook →**](https://matinmonshizadeh.github.io/animation-handbook/)++[](https://matinmonshizadeh.github.io/animation-handbook/) [](https://github.com/matinmonshizadeh/animation-handbook/stargazers) [](LICENSE)   ++</div>++---++## What this is-A visual reference of 113 web animation techniques. Each entry is a-self-contained HTML demo with an explanation of the mechanic — open-any file in a browser and it runs offline, no build step.+Every major web-animation technique in one place, each shown working. Open any folder's `index.html` in a browser and it runs offline — no build step, no frameworks, no CDN. The accompanying `README.md` explains the mechanic, the parameters that matter, and the production gotchas. Built to *inspire* and *teach*, not to sell a library.## Categories-| # | Category | Animations |-|---|----------|-----------|-| 01 | [Scroll-Based](animations/01-scroll-based/) | 20 |-| 02 | [Entrance & Exit](animations/02-entrance-and-exit/) | 13 |-| 03 | [Page Transitions](animations/03-page-transitions/) | 12 |-| 04 | [Micro-Interactions](animations/04-micro-interactions/) | 22 |-| 05 | [Text & Typography](animations/05-text-typography/) | 14 |-| 06 | [3D & Advanced](animations/06-3d-advanced/) | 17 |-| 07 | [Ambient & Background](animations/07-ambient-background/) | 15 |+| # | Category | Count | What's in it |+|:--:|----------|:-----:|--------------|+| 01 | [Scroll-Based](#01) | 21 | Animations driven by scroll position — parallax, sticky, scrub, snap, and narrative storytelling. |+| 02 | [Entrance & Exit](#02) | 13 | Element-level animations for arriving and departing — fades, slides, reveals, flips, and text staggers. |+| 03 | [Page Transitions](#03) | 12 | Full-page transitions between routes or views — crossfades, slides, portals, morphs, and the browser-native API. |+| 04 | [Micro-Interactions](#04) | 29 | Short, user-triggered animations — hover, click, focus, loading states, and UI feedback patterns. |+| 05 | [Text & Typography](#05) | 14 | Animations specifically for type — kinetic motion, character-level effects, gradient flows, and word transformations. |+| 06 | [3D & Advanced](#06) | 18 | WebGL, shaders, particles, 3D transforms, and the performance-sensitive effects that push the browser's limits. |+| 07 | [Ambient & Background](#07) | 17 | Passive, looping effects that hold visual interest without demanding attention — gradients, particles, grain, and glows. |++## Full catalog++All 124 techniques, each linked to its live demo.++<a id="01"></a>++### 01 · Scroll-Based · 21 techniques++<sub>Animations driven by scroll position — parallax, sticky, scrub, snap, and narrative storytelling.</sub>++<details><summary>Browse techniques</summary>++- **[Parallax Depth-of-Field](animations/01-scroll-based/parallax-depth-of-field/)** — Five mountain layers translate at different speeds; blur simulates camera depth-of-field.+- **[Parallax Scrolling](animations/01-scroll-based/parallax-scrolling/)** — Elements move at different speeds — background slower, foreground faster — creating a 3D depth illusion.+- **[Reverse-Scrolling Columns](animations/01-scroll-based/reverse-scrolling-columns/)** — A center column scrolls normally while two flanking columns scroll in reverse, looping infinitely.+- **[Cover Card to Fixed Header](animations/01-scroll-based/cover-card-to-fixed-header/)** — A full-page hero morphs into a compact fixed header — every visual property scrubbed to a single progress value.+- **[Fly-in Fly-out Contact List](animations/01-scroll-based/fly-in-fly-out-contact-list/)** — Rows translate and fade through entry, active, and exit zones as you scroll — bidirectional and continuous.+- **[Stacking Cards](animations/01-scroll-based/stacking-cards/)** — CSS Scroll-Driven Animations fan cards into a deck — per-index sticky offset creates the visible peek tab.+- **[ScrollTrigger Animation](animations/01-scroll-based/scroll-trigger/)** — The onEnter / onLeave lifecycle demonstrated with vanilla JS — four scroll trigger zones.+- **[Scrub Animation](animations/01-scroll-based/scrub-animation/)** — Every transform welded to scroll position — scrub backward and the animation reverses perfectly.+- **[Pin Animation](animations/01-scroll-based/pin-animation/)** — An element freezes in place while the page scrolls beneath it — CSS sticky, no JavaScript pinning.+- **[Snap Scrolling](animations/01-scroll-based/snap-scrolling/)** — CSS scroll-snap-type creates a paginated, magnetic feel — mandatory, proximity, and none compared.+- **[Scrollytelling](animations/01-scroll-based/scrollytelling/)** — Fractional chapter progress drives continuous depth crossfades across six ocean-layer chapters.+- **[Reveal on Scroll](animations/01-scroll-based/reveal-on-scroll/)** — Seven reveal techniques fired by IntersectionObserver at a configurable trigger line.+- **[Stagger Reveal](animations/01-scroll-based/stagger-reveal/)** — Groups reveal with cascading delays — forward, reverse, center-out, and random cascade directions.+- **[Horizontal Scroll](animations/01-scroll-based/horizontal-scroll/)** — Vertical scroll translates a horizontal panel strip — a tall pinned section provides the scroll budget.+- **[Sticky Section](animations/01-scroll-based/sticky-section/)** — The whole section pins while its interior morphs through four states scrubbed to scroll position.+- **[Counter Animation](animations/01-scroll-based/counter-animation/)** — Numbers count 0 → target with easing on scroll entry — four formats and configurable curve.+- **[Progress Bar](animations/01-scroll-based/progress-bar/)** — Reading progress in three styles — top bar, circular ring, and side rail — driven by scrollTop / scrollHeight.+- **[Section Wipe](animations/01-scroll-based/section-wipe/)** — The next section slides over the current via sticky z-index stacking — scale-down adds depth.+- **[Zoom Into Image](animations/01-scroll-based/zoom-into-image/)** — clip-path expands from a framed card to full-bleed as you scroll — the portal effect.+- **[Scroll Image Sequence](animations/01-scroll-based/scroll-image-sequence/)** — A canvas pinned with sticky; scroll progress maps to a frame index — the Apple product-scroll technique, frames drawn procedurally.+- **[Smooth (Inertia) Scroll](animations/01-scroll-based/smooth-scroll/)** — Wheel and touch input eased toward a target each frame — weighted, gliding momentum instead of native jumps.++</details>++<a id="02"></a>++### 02 · Entrance & Exit · 13 techniques++<sub>Element-level animations for arriving and departing — fades, slides, reveals, flips, and text staggers.</sub>++<details><summary>Browse techniques</summary>++- **[Fade In / Fade Out](animations/02-entrance-and-exit/fade-in-out/)** — Opacity 0 → 1 enter, 1 → 0 exit — the compositor handles this without re-painting.+- **[Slide In](animations/02-entrance-and-exit/slide-in/)** — Translates from an off-screen edge into final position — with or without simultaneous fade.+- **[Slide Up Reveal](animations/02-entrance-and-exit/slide-up-reveal/)** — Text rises from below its clip boundary — translateY method vs clip-path inset, identical visual result.+- **[Scale In / Zoom In](animations/02-entrance-and-exit/scale-in/)** — Scales from a small start value to 1.0 — transform-origin controls where the pop expands from.+- **[Clip-Path Reveal](animations/02-entrance-and-exit/clip-path-reveal/)** — A shape mask expands to uncover the element — content is always rendered, just progressively visible.+- **[Curtain Reveal](animations/02-entrance-and-exit/curtain-reveal/)** — A colored bar slides over content then off the other side — the reveal is hidden then exposed.+- **[Split Text Reveal](animations/02-entrance-and-exit/split-text-reveal/)** — Text split into chars, words, or lines — each piece staggers with --index CSS transition-delay.+- **[Letter-by-Letter Stagger](animations/02-entrance-and-exit/letter-by-letter-stagger/)** — CSS transition-delay cascade per letter, or JS typewriter mode with a blinking cursor.+- **[Word-by-Word Reveal](animations/02-entrance-and-exit/word-by-word-reveal/)** — Words animate sequentially at 80–120ms per word — the readable stagger speed for taglines.+- **[Blur In](animations/02-entrance-and-exit/blur-in/)** — Fades in while reducing blur — mimics camera focus pulling. Best on single hero elements.+- **[Flip In](animations/02-entrance-and-exit/flip-in/)** — Rotates from a flat plane into view using CSS 3D perspective — perspective on the parent is the key.+- **[Bounce In](animations/02-entrance-and-exit/bounce-in/)** — Overshoots final position then springs back — explicit @keyframes waypoints, not easing alone.+- **[Rotate In](animations/02-entrance-and-exit/rotate-in/)** — Spins while entering — best on radially-symmetric shapes like icons, stars, and gears.++</details>++<a id="03"></a>++### 03 · Page Transitions · 12 techniques++<sub>Full-page transitions between routes or views — crossfades, slides, portals, morphs, and the browser-native API.</sub>++<details><summary>Browse techniques</summary>++- **[View Transitions API](animations/03-page-transitions/view-transitions-api/)** — document.startViewTransition() — the browser captures before/after and animates automatically.+- **[Shared Element Transition](animations/03-page-transitions/shared-element-transition/)** — A thumbnail morphs continuously into a detail hero as pages change — the FLIP technique applied.+- **[Morph Transition](animations/03-page-transitions/morph-transition/)** — An SVG path morphs between page-specific shapes — point-by-point interpolation across 12-vertex paths.+- **[Crossfade](animations/03-page-transitions/crossfade/)** — Both pages visible simultaneously at ~50% opacity mid-transition — compare with sequential fade.+- **[Slide Transition](animations/03-page-transitions/slide-transition/)** — Directional slides with forward/back awareness — matches native iOS and Android navigation patterns.+- **[Zoom Transition](animations/03-page-transitions/zoom-transition/)** — Three scale variants — zoom-in, zoom-out, pull-through — each implying different spatial depth.+- **[Flash / Light Leak](animations/03-page-transitions/flash-transition/)** — A colored flash peaks at full opacity, hides the page swap, then fades to reveal the new scene.+- **[Blur Transition](animations/03-page-transitions/blur-transition/)** — Current page blurs and fades out, then new page sharpens in — a defocus wipe between scenes.+- **[Elastic Transition](animations/03-page-transitions/elastic-transition/)** — Spring physics cause overshoot before settling — CSS keyframes or live JS spring simulation.+- **[Portal / Tunnel Zoom](animations/03-page-transitions/portal-zoom/)** — clip-path expands from a portal element's center, zooming the viewport into the next page.+- **[Dissolve](animations/03-page-transitions/dissolve/)** — Random tiles fade at staggered delays — a non-uniform wipe that reads as dissolving rather than fading.+- **[FLIP Technique](animations/03-page-transitions/flip-technique/)** — First-Last-Invert-Play — CSS layout changes animated seamlessly by measuring position deltas.-## What's inside each entry+</details>-Every animation folder contains:+<a id="04"></a>-- `index.html` — a working demo with live controls (single file, runs offline)-- `README.md` — what it is, when to use it, how it works, key parameters, production notes, and related techniques+### 04 · Micro-Interactions · 29 techniques++<sub>Short, user-triggered animations — hover, click, focus, loading states, and UI feedback patterns.</sub>++<details><summary>Browse techniques</summary>++- **[Hover State Animation](animations/04-micro-interactions/hover-state/)** — Six hover techniques side by side — color shift, scale, lift, underline grow, icon nudge, and background sweep.+- **[Click / Tap Ripple](animations/04-micro-interactions/click-ripple/)** — Ripple emanates from the exact click point — Material Design's tactile confirmation pattern.+- **[Focus Ring Animation](animations/04-micro-interactions/focus-ring/)** — Animated outline on keyboard Tab — :focus-visible ensures mouse users see no ring.+- **[Button Press Scale](animations/04-micro-interactions/button-press-scale/)** — Scales to 0.95 on press, springs back on release — asymmetric timing gives a tactile feel.+- **[Magnetic Button](animations/04-micro-interactions/magnetic-button/)** — Button leans toward the cursor within a radius, label lagging for parallax — springs home on exit.+- **[Toggle / Switch Slide](animations/04-micro-interactions/toggle-switch/)** — Pill slides left/right for on/off — smooth cubic-bezier gives a weighted, physical feel.+- **[Heart / Like Burst](animations/04-micro-interactions/heart-burst/)** — Tap pops and fills the heart while small hearts burst outward on canvas — Twitter-style like.+- **[Success Confetti](animations/04-micro-interactions/success-confetti/)** — Completing an action fires a canvas confetti burst — rotating rectangles with gravity and spin.+- **[Skeleton Loader](animations/04-micro-interactions/skeleton-loader/)** — Pulsing placeholder blocks match the shape of real content — reduces perceived wait time.+- **[Shimmer Effect](animations/04-micro-interactions/shimmer-effect/)** — Gradient sweep over skeleton placeholders — gives the impression of data streaming in.+- **[Loading Spinner](animations/04-micro-interactions/loading-spinner/)** — Six spinner variants from a single CSS color and speed — ring, orbit, arc, bounce, pulse, square.+- **[Progress Animation](animations/04-micro-interactions/progress-animation/)** — Linear bar, circular ring, and stepped segments — all driven by a single percentage value.+- **[Checkmark Draw](animations/04-micro-interactions/checkmark-draw/)** — SVG path draws progressively on success — stroke-dashoffset animates from full length to zero.+- **[Form Field Morph](animations/04-micro-interactions/form-field-morph/)** — Floating label rises out of the input on focus — persists when the field is filled.+- **[Notification Badge Pulse](animations/04-micro-interactions/badge-pulse/)** — Dot on icon pulses to draw peripheral attention — scale, halo, or both.+- **[Tooltip Reveal](animations/04-micro-interactions/tooltip-reveal/)** — Info box fades in after a 300ms delay — long enough to avoid triggering on mouse pass-through.+- **[Drawer / Panel Slide](animations/04-micro-interactions/drawer-slide/)** — Off-canvas panel slides from edge — ease-out open, ease-in close. Backdrop dismisses.+- **[Modal Expand](animations/04-micro-interactions/modal-expand/)** — Modal scales from the trigger button's position — transform-origin set to where you clicked.+- **[Accordion Open/Close](animations/04-micro-interactions/accordion/)** — Height animates between 0 and auto — JS measured height vs CSS grid-template-rows compared.+- **[Cursor Follower](animations/04-micro-interactions/cursor-follower/)** — Custom element follows mouse with lerp lag — mix-blend-mode: difference inverts any background.+- **[Error Shake](animations/04-micro-interactions/error-shake/)** — An invalid field shakes horizontally with a decaying wobble and flashes red — the universal "no".+- **[Swipe to Dismiss](animations/04-micro-interactions/swipe-to-dismiss/)** — Drag a card past a threshold and it flies off as the row collapses — pointer-driven, touch-ready.+- **[Hamburger Menu Toggle](animations/04-micro-interactions/hamburger-menu-toggle/)** — The bars icon morphs to an X — top and bottom bars rotate to cross while the middle fades out.+- **[Theme Toggle Morph](animations/04-micro-interactions/theme-toggle-morph/)** — A sun morphs into a crescent moon as the interface flips between light and dark.+- **[Copy to Clipboard](animations/04-micro-interactions/copy-to-clipboard/)** — The copy button swaps to a checkmark and a Copied confirmation, then reverts after a moment.+- **[Star Rating](animations/04-micro-interactions/star-rating/)** — Stars fill toward the pointer and pop on commit — an accessible five-star control.+- **[Toast Notification](animations/04-micro-interactions/toast-notification/)** — Notification cards slide in from a corner, stack, and auto-dismiss with a progress bar — swipe or click to dismiss.+- **[Segmented Control](animations/04-micro-interactions/segmented-control/)** — A highlighted pill slides beneath the selected segment as the active label crossfades — the iOS control.+- **[Pull to Refresh](animations/04-micro-interactions/pull-to-refresh/)** — Dragging past the top reveals a spinner that fills with distance; release past the threshold to refresh.++</details>++<a id="05"></a>++### 05 · Text & Typography · 14 techniques++<sub>Animations specifically for type — kinetic motion, character-level effects, gradient flows, and word transformations.</sub>++<details><summary>Browse techniques</summary>++- **[Kinetic Typography](animations/05-text-typography/kinetic-typography/)** — Phrases enter, transform, and exit in a choreographed timeline — motion reinforces meaning.+- **[Typewriter Effect](animations/05-text-typography/typewriter-effect/)** — Characters appear one at a time with a blinking cursor — natural timing variance makes it feel human.+- **[Scramble / Glitch Text](animations/05-text-typography/scramble-text/)** — Characters cycle randomly before locking left-to-right — decryption and sci-fi aesthetic.+- **[Variable Font Morph](animations/05-text-typography/variable-font-morph/)** — CSS font-variation-settings animates weight, slant, and casual axes of a variable font.+- **[Text Clip-Path Reveal](animations/05-text-typography/text-clip-path-reveal/)** — Lines reveal via expanding clip-path mask — preserves kerning and typographic spacing exactly.+- **[Marquee / Ticker](animations/05-text-typography/marquee-ticker/)** — Continuous horizontal scroll with seamless loop — duplicated content makes the reset invisible.+- **[Text Morphing](animations/05-text-typography/text-morphing/)** — One word transitions into another character by character — each letter slides out as the next slides in.+- **[Text Gradient Animation](animations/05-text-typography/text-gradient-animation/)** — background-clip: text with animated background-position flows color through the characters.+- **[Outline to Fill](animations/05-text-typography/outline-to-fill/)** — Hollow stroke letterforms fill with color — clip-path reveal or opacity crossfade.+- **[Enter/Exit Typography](animations/05-text-typography/enter-exit-typography/)** — Three-act phrase lifecycle: enter → hold → exit, sequenced for storytelling.+- **[Rotate Word Carousel](animations/05-text-typography/rotate-word-carousel/)** — One keyword cycles through a list while the surrounding sentence stays static.+- **[Glitch Text](animations/05-text-typography/glitch-text/)** — RGB-split copies jitter behind animated clip-path slices — the datamosh / signal-loss aesthetic.+- **[Text on a Path](animations/05-text-typography/text-on-path/)** — Text flows along an SVG curve via textPath with an animated startOffset — wave, arc, or circle.+- **[Wavy Text](animations/05-text-typography/wavy-text/)** — Per-letter sine-wave bob with a staggered delay sends a wave travelling across the word.++</details>++<a id="06"></a>++### 06 · 3D & Advanced · 18 techniques++<sub>WebGL, shaders, particles, 3D transforms, and the performance-sensitive effects that push the browser's limits.</sub>++<details><summary>Browse techniques</summary>++- **[3D Model Orbit](animations/06-3d-advanced/3d-model-orbit/)** — Phong-shaded WebGL geometry — vertex buffers, MVP matrix, and lighting in raw WebGL.+- **[Scroll-Driven 3D Rotation](animations/06-3d-advanced/scroll-driven-3d-rotation/)** — CSS cube rotates through four choreographed stages as you scroll — the Apple product-page pattern.+- **[Parallax 3D Tilt](animations/06-3d-advanced/parallax-3d-tilt/)** — CSS perspective + rotateX/Y follows mouse — a shine highlight tracks the virtual light source.+- **[Canvas Particle Effect](animations/06-3d-advanced/canvas-particle-effect/)** — 500 drifting particles with O(n²) proximity connections and mouse repel/attract on 2D canvas.+- **[Fluid Simulation](animations/06-3d-advanced/fluid-simulation/)** — WebGL metaballs — SDF spheres merged via smooth-minimum in a GLSL fragment shader.+- **[Glassmorphism Animated](animations/06-3d-advanced/glassmorphism-animated/)** — backdrop-filter: blur() over animated gradient blobs — three frost variants.+- **[WebGL Shader Animation](animations/06-3d-advanced/webgl-shader-animation/)** — Four GLSL fragment shader presets: plasma, wave distortion, Voronoi, kaleidoscope.+- **[Noise-Based Motion](animations/06-3d-advanced/noise-based-motion/)** — Simplex noise drives a wind field and a morphing blob — smooth random, not chaotic random.+- **[SVG Path Animation](animations/06-3d-advanced/svg-path-animation/)** — stroke-dashoffset reveals three SVG drawings — icon, signature, and logo mark.+- **[Chromatic Aberration](animations/06-3d-advanced/chromatic-aberration/)** — RGB channels offset via mix-blend-mode: screen — static, pulse, and glitch modes.+- **[2.5D / Pseudo-3D](animations/06-3d-advanced/2-5d-pseudo-3d/)** — Seven depth layers parallax at different rates — mouse-driven or auto-panning camera.+- **[Ray Marching / SDF](animations/06-3d-advanced/ray-marching-sdf/)** — 3D scene entirely in a fragment shader — sphere blend, boolean ops, infinite repetition.+- **[GPGPU Particle System](animations/06-3d-advanced/gpgpu-particle-system/)** — 65k+ particles computed in WebGL2 textures — physics in a shader, texture ping-pong.+- **[Image Distortion on Hover](animations/06-3d-advanced/image-distortion-hover/)** — Fragment shader displaces UV coordinates around the cursor — ripple, push, liquid, pixelate.+- **[Cloth Simulation](animations/06-3d-advanced/cloth-simulation/)** — Verlet integration + distance constraints — draggable flag responds to gravity and wind.+- **[Volumetric Smoke](animations/06-3d-advanced/volumetric-smoke/)** — Ray marching accumulates 3D noise density — light scattering, shadow rays, fBm clouds.+- **[Morphing Blob](animations/06-3d-advanced/morphing-blob/)** — Metaball circles fused by an SVG blur-plus-contrast filter melt like liquid — the blob drifts and a droplet chases the pointer.+- **[3D Flip Card](animations/06-3d-advanced/flip-card-3d/)** — A card rotates in 3D to reveal its back face using preserve-3d, perspective, and backface-visibility.++</details>++<a id="07"></a>++### 07 · Ambient & Background · 17 techniques++<sub>Passive, looping effects that hold visual interest without demanding attention — gradients, particles, grain, and glows.</sub>++<details><summary>Browse techniques</summary>++- **[Animated Gradient Background](animations/07-ambient-background/animated-gradient-background/)** — CSS gradient shifts hue and position continuously — pure CSS, no JavaScript, seamless loop.+- **[Mesh Gradient Animation](animations/07-ambient-background/mesh-gradient/)** — Blurred radial gradient blobs drift slowly — organic color washes popularized by Stripe.+- **[Aurora / Northern Lights](animations/07-ambient-background/aurora/)** — Tall color bands drift and skew horizontally — heavy blur fakes the curtain of light.+- **[Grain / Film Noise Overlay](animations/07-ambient-background/grain-overlay/)** — Animated noise at 5–10% opacity adds cinematic warmth — subtlety is everything.+- **[Scanline Effect](animations/07-ambient-background/scanline/)** — CRT horizontal lines with optional sweep beam, curvature, and phosphor glow.+- **[Light Leak](animations/07-ambient-background/light-leak/)** — Warm gradient fires at random irregular intervals — analog film camera aesthetic.+- **[Starfield / Space Particles](animations/07-ambient-background/starfield/)** — Stars drift outward from center with parallax depth — slow ambient speed, never hyperspace.+- **[Breathing / Pulsing Glow](animations/07-ambient-background/breathing-glow/)** — Radial glow expands and contracts on a 5-second breath cycle — calm resting state.+- **[Ambient Ripple Effect](animations/07-ambient-background/ambient-ripple/)** — Concentric rings emit periodically from idle sources — passive atmosphere, not click-driven.+- **[Floating Elements](animations/07-ambient-background/floating-elements/)** — Geometric shapes drift on independent sine-wave paths — no two elements synchronized.+- **[Grid / Dot Pattern Parallax](animations/07-ambient-background/grid-dot-pattern-parallax/)** — Pattern shifts subtly opposite to mouse movement — depth felt, barely seen.+- **[Abstract Geometric Motion](animations/07-ambient-background/abstract-geometric-motion/)** — Four hypnotic loops: rotating polygons, expanding rings, sliding bars, flowing color lines.+- **[Particle Constellation](animations/07-ambient-background/particle-constellation/)** — Drifting nodes link with lines when they come close — the network-mesh hero background.+- **[Flow Field](animations/07-ambient-background/flow-field/)** — Particles follow a noise-driven vector field, leaving flowing trails.+- **[Synthwave Grid](animations/07-ambient-background/synthwave-grid/)** — A perspective grid scrolls toward a glowing sun — the retro synthwave horizon.+- **[Matrix Rain](animations/07-ambient-background/matrix-rain/)** — Columns of glowing characters fall down a dark canvas, leaders bright and trails fading.+- **[Plasma Field](animations/07-ambient-background/plasma/)** — Summed sine functions of x, y, and time make a flowing, organic color field — the demoscene classic.++</details>## Design principles-**One technique, one file.** No build step, no frameworks, no external-dependencies. Open the HTML and it runs.+**One technique, one file.** No build step, no frameworks, no external dependencies. Open the HTML and it runs.**Show, then explain.** The demo is the main artifact. The README supports it.-**Technique over tool.** GSAP, Framer Motion, and Three.js get mentioned in-production notes — they are never the subject of an entry.+**Technique over tool.** GSAP, Framer Motion, and Three.js are mentioned in production notes — they are never the subject of an entry.## Contributing-Each animation lives under `animations/<category>/<slug>/` with exactly-`index.html` and `README.md`. See [CLAUDE.md](CLAUDE.md) for the full-authoring guide — file templates, taxonomy rules, and responsiveness-requirements.+Contributions are welcome — new techniques, fixes, and improvements. Each animation lives under `animations/<category>/<slug>/` with exactly `index.html` and `README.md`. See [CONTRIBUTING.md](CONTRIBUTING.md) for the authoring guide and [CLAUDE.md](CLAUDE.md) for the full spec.++If this handbook helped you, a ⭐ makes it easier for others to find.++## License++[MIT](LICENSE) © matinmonshizadehdiff --git a/animations/01-scroll-based/README.md b/animations/01-scroll-based/README.mdindex f5a9d9b8..130963dd 100644--- a/animations/01-scroll-based/README.md+++ b/animations/01-scroll-based/README.md@@ -44,3 +44,5 @@ Techniques driven by scroll position.as you scroll; the portal effect is clip-path: inset() collapsing from center outward.- [Scroll Image Sequence](scroll-image-sequence/) — a canvas pinned with position:sticky whilescroll progress maps to a frame index; the Apple product-scroll technique, frames drawn procedurally.+- [Smooth (Inertia) Scroll](smooth-scroll/) — wheel and touch input eased toward a target each+ frame with a lerp, giving weighted, gliding momentum instead of the browser's instant jumps.diff --git a/animations/01-scroll-based/counter-animation/index.html b/animations/01-scroll-based/counter-animation/index.htmlindex 92367af8..ec68c080 100644--- a/animations/01-scroll-based/counter-animation/index.html+++ b/animations/01-scroll-based/counter-animation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Counter Animation</title>+ <title>Counter Animation — Animation Handbook</title>+ <meta name="description" content="Numbers count from 0 to target on scroll entry, with easing and per-format rendering every frame.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/counter-animation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Counter Animation — Animation Handbook">+ <meta property="og:description" content="Numbers count from 0 to target on scroll entry, with easing and per-format rendering every frame.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/counter-animation/">+ <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="Counter Animation — Animation Handbook">+ <meta name="twitter:description" content="Numbers count from 0 to target on scroll entry, with easing and per-format rendering every frame.">+ <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": "Counter Animation", "name": "Counter Animation", "description": "Numbers count from 0 to target on scroll entry, with easing and per-format rendering every frame.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/counter-animation/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Counter Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -43,8 +57,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:460px}#stats{grid-template-columns:1fr 1fr}}@media(prefers-reduced-motion:reduce){.tile-num{transition:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../sticky-section/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../progress-bar/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/counter-animation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Counter Animation</h1><p>Numbers count from 0 to target on scroll entry, with easing and per-format rendering every frame.</p>@@ -157,5 +185,6 @@});buildObserver();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/cover-card-to-fixed-header/index.html b/animations/01-scroll-based/cover-card-to-fixed-header/index.htmlindex 58a2ea0e..2dac40eb 100644--- a/animations/01-scroll-based/cover-card-to-fixed-header/index.html+++ b/animations/01-scroll-based/cover-card-to-fixed-header/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Cover Card to Fixed Header</title>+ <title>Cover Card to Fixed Header — Animation Handbook</title>+ <meta name="description" content="A full-page hero cover morphs into a compact fixed header as you scroll — every property scrubbed to a single 0→1 progress value.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/cover-card-to-fixed-header/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Cover Card to Fixed Header — Animation Handbook">+ <meta property="og:description" content="A full-page hero cover morphs into a compact fixed header as you scroll — every property scrubbed to a single 0→1 progress value.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/cover-card-to-fixed-header/">+ <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="Cover Card to Fixed Header — Animation Handbook">+ <meta name="twitter:description" content="A full-page hero cover morphs into a compact fixed header as you scroll — every property scrubbed to a single 0→1 progress value.">+ <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": "Cover Card to Fixed Header", "name": "Cover Card to Fixed Header", "description": "A full-page hero cover morphs into a compact fixed header as you scroll — every property scrubbed to a single 0→1 progress value.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/cover-card-to-fixed-header/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Cover Card to Fixed Header"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -118,8 +132,22 @@.cover,.cover-title,.cover-bg,.header-chip{will-change:auto}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../reverse-scrolling-columns/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../fly-in-fly-out-contact-list/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/cover-card-to-fixed-header/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Cover Card to Fixed Header</h1>@@ -299,5 +327,6 @@apply(0);</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/fly-in-fly-out-contact-list/index.html b/animations/01-scroll-based/fly-in-fly-out-contact-list/index.htmlindex 742aafd5..17a9e4db 100644--- a/animations/01-scroll-based/fly-in-fly-out-contact-list/index.html+++ b/animations/01-scroll-based/fly-in-fly-out-contact-list/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Fly-in Fly-out Contact List</title>+ <title>Fly-in Fly-out Contact List — Animation Handbook</title>+ <meta name="description" content="Rows translate and fade as they enter and exit the scroll viewport — effect scrubbed continuously to scroll position.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/fly-in-fly-out-contact-list/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Fly-in Fly-out Contact List — Animation Handbook">+ <meta property="og:description" content="Rows translate and fade as they enter and exit the scroll viewport — effect scrubbed continuously to scroll position.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/fly-in-fly-out-contact-list/">+ <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="Fly-in Fly-out Contact List — Animation Handbook">+ <meta name="twitter:description" content="Rows translate and fade as they enter and exit the scroll viewport — effect scrubbed continuously to scroll position.">+ <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": "Fly-in Fly-out Contact List", "name": "Fly-in Fly-out Contact List", "description": "Rows translate and fade as they enter and exit the scroll viewport — effect scrubbed continuously to scroll position.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/fly-in-fly-out-contact-list/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Fly-in Fly-out Contact List"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -102,8 +116,22 @@}@media(prefers-reduced-motion:reduce){.row{will-change:auto}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../cover-card-to-fixed-header/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../stacking-cards/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/fly-in-fly-out-contact-list/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Fly-in Fly-out Contact List</h1>@@ -299,5 +327,6 @@updateOverlay();update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/horizontal-scroll/index.html b/animations/01-scroll-based/horizontal-scroll/index.htmlindex 4ddf533b..33da0827 100644--- a/animations/01-scroll-based/horizontal-scroll/index.html+++ b/animations/01-scroll-based/horizontal-scroll/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Horizontal Scroll</title>+ <title>Horizontal Scroll — Animation Handbook</title>+ <meta name="description" content="Vertical scroll translates a horizontal track — a pin section provides the scroll budget.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/horizontal-scroll/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Horizontal Scroll — Animation Handbook">+ <meta property="og:description" content="Vertical scroll translates a horizontal track — a pin section provides the scroll budget.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/horizontal-scroll/">+ <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="Horizontal Scroll — Animation Handbook">+ <meta name="twitter:description" content="Vertical scroll translates a horizontal track — a pin section provides the scroll budget.">+ <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": "Horizontal Scroll", "name": "Horizontal Scroll", "description": "Vertical scroll translates a horizontal track — a pin section provides the scroll budget.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/horizontal-scroll/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Horizontal Scroll"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -50,8 +64,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:480px}.panel{padding:24px}}@media(prefers-reduced-motion:reduce){#h-track{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../stagger-reveal/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../sticky-section/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/horizontal-scroll/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Horizontal Scroll</h1><p>Vertical scroll translates a horizontal track — a pin section provides the scroll budget.</p>@@ -134,5 +162,6 @@document.getElementById('rst').addEventListener('click',()=>{stage.scrollTop=0;update()});update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/parallax-depth-of-field/index.html b/animations/01-scroll-based/parallax-depth-of-field/index.htmlindex c4b07e75..2b1b1853 100644--- a/animations/01-scroll-based/parallax-depth-of-field/index.html+++ b/animations/01-scroll-based/parallax-depth-of-field/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Parallax Depth-of-Field</title>+ <title>Parallax Depth-of-Field — Animation Handbook</title>+ <meta name="description" content="Five mountain layers translate at different speeds; a focal plane blurs each by its depth distance.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/parallax-depth-of-field/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Parallax Depth-of-Field — Animation Handbook">+ <meta property="og:description" content="Five mountain layers translate at different speeds; a focal plane blurs each by its depth distance.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/parallax-depth-of-field/">+ <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="Parallax Depth-of-Field — Animation Handbook">+ <meta name="twitter:description" content="Five mountain layers translate at different speeds; a focal plane blurs each by its depth distance.">+ <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": "Parallax Depth-of-Field", "name": "Parallax Depth-of-Field", "description": "Five mountain layers translate at different speeds; a focal plane blurs each by its depth distance.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/parallax-depth-of-field/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Parallax Depth-of-Field"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -103,8 +117,22 @@.layer { will-change: auto; }}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../parallax-scrolling/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/parallax-depth-of-field/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Parallax Depth-of-Field</h1>@@ -253,5 +281,6 @@applyFrame(0);</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/parallax-scrolling/index.html b/animations/01-scroll-based/parallax-scrolling/index.htmlindex d2696ea4..d9fbfb28 100644--- a/animations/01-scroll-based/parallax-scrolling/index.html+++ b/animations/01-scroll-based/parallax-scrolling/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Parallax Scrolling</title>+ <title>Parallax Scrolling — Animation Handbook</title>+ <meta name="description" content="Elements move at different speeds — background slower, foreground faster — creating a 3D depth illusion.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/parallax-scrolling/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Parallax Scrolling — Animation Handbook">+ <meta property="og:description" content="Elements move at different speeds — background slower, foreground faster — creating a 3D depth illusion.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/parallax-scrolling/">+ <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="Parallax Scrolling — Animation Handbook">+ <meta name="twitter:description" content="Elements move at different speeds — background slower, foreground faster — creating a 3D depth illusion.">+ <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": "Parallax Scrolling", "name": "Parallax Scrolling", "description": "Elements move at different speeds — background slower, foreground faster — creating a 3D depth illusion.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/parallax-scrolling/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Parallax Scrolling"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -79,8 +93,22 @@}@media(prefers-reduced-motion:reduce){.layer{will-change:auto}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../parallax-depth-of-field/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../reverse-scrolling-columns/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/parallax-scrolling/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Parallax Scrolling</h1>@@ -269,5 +297,6 @@update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/pin-animation/index.html b/animations/01-scroll-based/pin-animation/index.htmlindex 46c776bf..08e5a8cc 100644--- a/animations/01-scroll-based/pin-animation/index.html+++ b/animations/01-scroll-based/pin-animation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Pin Animation</title>+ <title>Pin Animation — Animation Handbook</title>+ <meta name="description" content="Element freezes in place while the page scrolls beneath it — CSS position: sticky, no JavaScript pinning.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/pin-animation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Pin Animation — Animation Handbook">+ <meta property="og:description" content="Element freezes in place while the page scrolls beneath it — CSS position: sticky, no JavaScript pinning.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/pin-animation/">+ <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="Pin Animation — Animation Handbook">+ <meta name="twitter:description" content="Element freezes in place while the page scrolls beneath it — CSS position: sticky, no JavaScript pinning.">+ <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": "Pin Animation", "name": "Pin Animation", "description": "Element freezes in place while the page scrolls beneath it — CSS position: sticky, no JavaScript pinning.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/pin-animation/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Pin Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -49,8 +63,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}.stage{height:480px}.intro,.outro{height:480px}.pin-inner{flex-direction:column;gap:16px}.phone-wrap svg{transform:scale(.8)}}@media(prefers-reduced-motion:reduce){.feat-seg{transition:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../scrub-animation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../snap-scrolling/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/pin-animation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Pin Animation</h1><p>Element freezes in place while the page scrolls beneath it — CSS position: sticky, no JavaScript pinning.</p>@@ -139,5 +167,6 @@document.getElementById('reset-btn').addEventListener('click',()=>{stage.scrollTop=0;update()});update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/progress-bar/index.html b/animations/01-scroll-based/progress-bar/index.htmlindex 8714f194..17a08cd6 100644--- a/animations/01-scroll-based/progress-bar/index.html+++ b/animations/01-scroll-based/progress-bar/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Progress Bar</title>+ <title>Progress Bar — Animation Handbook</title>+ <meta name="description" content="Reading progress across three indicator styles — top bar, circular ring, and side rail.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/progress-bar/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Progress Bar — Animation Handbook">+ <meta property="og:description" content="Reading progress across three indicator styles — top bar, circular ring, and side rail.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/progress-bar/">+ <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="Progress Bar — Animation Handbook">+ <meta name="twitter:description" content="Reading progress across three indicator styles — top bar, circular ring, and side rail.">+ <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": "Progress Bar", "name": "Progress Bar", "description": "Reading progress across three indicator styles — top bar, circular ring, and side rail.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/progress-bar/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Progress Bar"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -57,8 +71,22 @@/* Reduced motion: indicators update instantly (they carry no transition today; gated defensively) */@media(prefers-reduced-motion:reduce){.stage{scroll-behavior:auto!important}#top-bar,#side-fill,.circ-fg{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../counter-animation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../section-wipe/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/progress-bar/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Progress Bar</h1><p>Reading progress across three indicator styles — top bar, circular ring, and side rail.</p>@@ -180,5 +208,6 @@document.getElementById('rst').addEventListener('click',()=>{stage.scrollTop=0;update()});setStyle('top');update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/reveal-on-scroll/index.html b/animations/01-scroll-based/reveal-on-scroll/index.htmlindex d47f8840..51529751 100644--- a/animations/01-scroll-based/reveal-on-scroll/index.html+++ b/animations/01-scroll-based/reveal-on-scroll/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Reveal on Scroll</title>+ <title>Reveal on Scroll — Animation Handbook</title>+ <meta name="description" content="7 reveal techniques fired by IntersectionObserver — dashed line marks the trigger threshold.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/reveal-on-scroll/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Reveal on Scroll — Animation Handbook">+ <meta property="og:description" content="7 reveal techniques fired by IntersectionObserver — dashed line marks the trigger threshold.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/reveal-on-scroll/">+ <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="Reveal on Scroll — Animation Handbook">+ <meta name="twitter:description" content="7 reveal techniques fired by IntersectionObserver — dashed line marks the trigger threshold.">+ <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": "Reveal on Scroll", "name": "Reveal on Scroll", "description": "7 reveal techniques fired by IntersectionObserver — dashed line marks the trigger threshold.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/reveal-on-scroll/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Reveal on Scroll"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -68,8 +82,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){.card,.card .stagger-child{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../scrollytelling/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../stagger-reveal/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/reveal-on-scroll/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Reveal on Scroll</h1><p>7 reveal techniques fired by IntersectionObserver — dashed line marks the trigger threshold.</p>@@ -193,5 +221,6 @@stage.addEventListener('scroll',updateLine,{passive:true});updateLine();buildObserver();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/reverse-scrolling-columns/index.html b/animations/01-scroll-based/reverse-scrolling-columns/index.htmlindex eb082619..fe088386 100644--- a/animations/01-scroll-based/reverse-scrolling-columns/index.html+++ b/animations/01-scroll-based/reverse-scrolling-columns/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Reverse-Scrolling Columns</title>+ <title>Reverse-Scrolling Columns — Animation Handbook</title>+ <meta name="description" content="A center column that scrolls normally while two flanking columns scroll in the opposite direction.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/reverse-scrolling-columns/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Reverse-Scrolling Columns — Animation Handbook">+ <meta property="og:description" content="A center column that scrolls normally while two flanking columns scroll in the opposite direction.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/reverse-scrolling-columns/">+ <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="Reverse-Scrolling Columns — Animation Handbook">+ <meta name="twitter:description" content="A center column that scrolls normally while two flanking columns scroll in the opposite direction.">+ <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": "Reverse-Scrolling Columns", "name": "Reverse-Scrolling Columns", "description": "A center column that scrolls normally while two flanking columns scroll in the opposite direction.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/reverse-scrolling-columns/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Reverse-Scrolling Columns"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -89,8 +103,22 @@}@media(prefers-reduced-motion:reduce){.col-inner{will-change:auto}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../parallax-scrolling/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../cover-card-to-fixed-header/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/reverse-scrolling-columns/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Reverse-Scrolling Columns</h1>@@ -279,5 +307,6 @@update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/scroll-image-sequence/index.html b/animations/01-scroll-based/scroll-image-sequence/index.htmlindex 7f2bc8cf..f162d032 100644--- a/animations/01-scroll-based/scroll-image-sequence/index.html+++ b/animations/01-scroll-based/scroll-image-sequence/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Scroll Image Sequence</title>+ <title>Scroll Image Sequence — Animation Handbook</title>+ <meta name="description" content="The Apple product-scroll technique: a canvas pinned with position:sticky while scroll progress maps to a frame index that gets drawn — scrub back and it reverses perfectly.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scroll-image-sequence/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Scroll Image Sequence — Animation Handbook">+ <meta property="og:description" content="The Apple product-scroll technique: a canvas pinned with position:sticky while scroll progress maps to a frame index that gets drawn — scrub back and it reverses perfectly.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scroll-image-sequence/">+ <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="Scroll Image Sequence — Animation Handbook">+ <meta name="twitter:description" content="The Apple product-scroll technique: a canvas pinned with position:sticky while scroll progress maps to a frame index that gets drawn — scrub back and it reverses perfectly.">+ <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": "Scroll Image Sequence", "name": "Scroll Image Sequence", "description": "The Apple product-scroll technique: a canvas pinned with position:sticky while scroll progress maps to a frame index that gets drawn — scrub back and it reverses perfectly.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scroll-image-sequence/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Scroll Image Sequence"}</script><style>:root{--bg:#0b0b0d;--stage:#04060c;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);@@ -43,8 +57,22 @@}@media(prefers-reduced-motion:reduce){.hint{transition:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../zoom-into-image/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../smooth-scroll/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/scroll-image-sequence/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Scroll Image Sequence</h1><p>The Apple product-scroll technique: a canvas pinned with position:sticky while scroll progress maps to a frame index that gets drawn — scrub back and it reverses perfectly.</p>@@ -165,5 +193,6 @@ addEventListener('resize',()=>{resize();updateTarget();});resize();updateTarget();shownFrame=targetFrame;loop();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/scroll-trigger/index.html b/animations/01-scroll-based/scroll-trigger/index.htmlindex 4216ebb8..918218e0 100644--- a/animations/01-scroll-based/scroll-trigger/index.html+++ b/animations/01-scroll-based/scroll-trigger/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>ScrollTrigger Animation</title>+ <title>ScrollTrigger Animation — Animation Handbook</title>+ <meta name="description" content="Lifecycle callbacks — onEnter, onLeave, onEnterBack, onLeaveBack — demonstrated with vanilla JS.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scroll-trigger/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="ScrollTrigger Animation — Animation Handbook">+ <meta property="og:description" content="Lifecycle callbacks — onEnter, onLeave, onEnterBack, onLeaveBack — demonstrated with vanilla JS.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scroll-trigger/">+ <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="ScrollTrigger Animation — Animation Handbook">+ <meta name="twitter:description" content="Lifecycle callbacks — onEnter, onLeave, onEnterBack, onLeaveBack — demonstrated with vanilla JS.">+ <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": "ScrollTrigger Animation", "name": "ScrollTrigger Animation", "description": "Lifecycle callbacks — onEnter, onLeave, onEnterBack, onLeaveBack — demonstrated with vanilla JS.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scroll-trigger/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, ScrollTrigger Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -61,8 +75,22 @@@media(hover:hover){button:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}.stage{height:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../stacking-cards/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../scrub-animation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/scroll-trigger/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>ScrollTrigger Animation</h1><p>Lifecycle callbacks — onEnter, onLeave, onEnterBack, onLeaveBack — demonstrated with vanilla JS.</p>@@ -184,5 +212,6 @@document.getElementById('reset-btn').addEventListener('click',()=>{stage.scrollTop=0;update()});update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/scrollytelling/index.html b/animations/01-scroll-based/scrollytelling/index.htmlindex 2212e112..dadd4ce3 100644--- a/animations/01-scroll-based/scrollytelling/index.html+++ b/animations/01-scroll-based/scrollytelling/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Scrollytelling</title>+ <title>Scrollytelling — Animation Handbook</title>+ <meta name="description" content="Fractional chapter progress drives depth readout and ocean-layer crossfades continuously, not in steps.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scrollytelling/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Scrollytelling — Animation Handbook">+ <meta property="og:description" content="Fractional chapter progress drives depth readout and ocean-layer crossfades continuously, not in steps.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scrollytelling/">+ <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="Scrollytelling — Animation Handbook">+ <meta name="twitter:description" content="Fractional chapter progress drives depth readout and ocean-layer crossfades continuously, not in steps.">+ <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": "Scrollytelling", "name": "Scrollytelling", "description": "Fractional chapter progress drives depth readout and ocean-layer crossfades continuously, not in steps.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scrollytelling/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Scrollytelling"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -50,8 +64,22 @@}@media(prefers-reduced-motion:reduce){#ph-bg{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../snap-scrolling/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../reveal-on-scroll/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/scrollytelling/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Scrollytelling</h1><p>Fractional chapter progress drives depth readout and ocean-layer crossfades continuously, not in steps.</p>@@ -148,5 +176,6 @@document.getElementById('rst').addEventListener('click',()=>{stage.scrollTop=0;update()});update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/scrub-animation/index.html b/animations/01-scroll-based/scrub-animation/index.htmlindex 589a742d..48465913 100644--- a/animations/01-scroll-based/scrub-animation/index.html+++ b/animations/01-scroll-based/scrub-animation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Scrub Animation</title>+ <title>Scrub Animation — Animation Handbook</title>+ <meta name="description" content="Timeline linked to scroll position — scrub backward and the animation reverses perfectly.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scrub-animation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Scrub Animation — Animation Handbook">+ <meta property="og:description" content="Timeline linked to scroll position — scrub backward and the animation reverses perfectly.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scrub-animation/">+ <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="Scrub Animation — Animation Handbook">+ <meta name="twitter:description" content="Timeline linked to scroll position — scrub backward and the animation reverses perfectly.">+ <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": "Scrub Animation", "name": "Scrub Animation", "description": "Timeline linked to scroll position — scrub backward and the animation reverses perfectly.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scrub-animation/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Scrub Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -39,8 +53,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}.stage{height:480px}.scene{height:480px}}@media(prefers-reduced-motion:reduce){.tl-fill{transition:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../scroll-trigger/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../pin-animation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/scrub-animation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Scrub Animation</h1><p>Timeline linked to scroll position — scrub backward and the animation reverses perfectly.</p>@@ -154,5 +182,6 @@document.getElementById('j-end').addEventListener('click',()=>stage.scrollTo({top:stage.scrollHeight-stage.clientHeight,behavior:'smooth'}));update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/section-wipe/index.html b/animations/01-scroll-based/section-wipe/index.htmlindex b6120fff..67a5e9c3 100644--- a/animations/01-scroll-based/section-wipe/index.html+++ b/animations/01-scroll-based/section-wipe/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Section Wipe</title>+ <title>Section Wipe — Animation Handbook</title>+ <meta name="description" content="Stacked sticky sections with ascending z-index — the next section rises over the current one as you scroll.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/section-wipe/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Section Wipe — Animation Handbook">+ <meta property="og:description" content="Stacked sticky sections with ascending z-index — the next section rises over the current one as you scroll.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/section-wipe/">+ <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="Section Wipe — Animation Handbook">+ <meta name="twitter:description" content="Stacked sticky sections with ascending z-index — the next section rises over the current one as you scroll.">+ <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": "Section Wipe", "name": "Section Wipe", "description": "Stacked sticky sections with ascending z-index — the next section rises over the current one as you scroll.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/section-wipe/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Section Wipe"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -40,8 +54,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:460px}}@media(prefers-reduced-motion:reduce){.sec-content{will-change:auto}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../progress-bar/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../zoom-into-image/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/section-wipe/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Section Wipe</h1><p>Stacked sticky sections with ascending z-index — the next section rises over the current one as you scroll.</p>@@ -131,5 +159,6 @@document.getElementById('rst').addEventListener('click',()=>{stage.scrollTop=0;update()});update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/smooth-scroll/README.md b/animations/01-scroll-based/smooth-scroll/README.mdnew file mode 100644index 00000000..44b7e05b--- /dev/null+++ b/animations/01-scroll-based/smooth-scroll/README.md@@ -0,0 +1,65 @@+# Smooth (Inertia) Scroll++[Live demo](index.html)++## What it is++Smooth scroll captures the user's wheel and touch input, converts it into a target scroll position, and then eases the content toward that target a little each frame instead of jumping to it. The result is a weighted, gliding motion with momentum — the feel popularized by libraries like Lenis and Locomotive Scroll — rather than the browser's instant, one-to-one native scroll.++## When to use it++- Marketing and portfolio sites where a deliberate, cinematic scroll pace reinforces the brand+- Scroll-driven storytelling where you want animations to feel synchronized with a smoothed scroll value+- Interfaces pairing smooth scroll with parallax or scrubbed timelines, so every scroll-linked effect shares one eased source of truth+- Cases where you control the whole page experience and can accept the accessibility trade-offs below++Avoid it for dense, utility-first content (dashboards, docs, long forms) where users expect scroll to track their input exactly.++## How it works++Two numbers are kept: `target` (where scroll wants to be) and `current` (where the content sits right now). Input events move only the target. A `requestAnimationFrame` loop moves `current` a fraction of the remaining distance toward `target` every frame — a linear interpolation, or lerp — and writes that value to the inner content as a `translate3d`, a compositor-only transform.++```js+// input only nudges the target+stage.addEventListener('wheel', e => {+ e.preventDefault();+ target = clamp(target + e.deltaY, 0, maxScroll);+}, { passive: false });++// each frame eases current toward target+function loop() {+ current += (target - current) * ease; // ease ~0.09+ content.style.transform = `translate3d(0, ${-current}px, 0)`;+ requestAnimationFrame(loop);+}+```++Touch drag uses Pointer Events: on `pointerdown` the current target is captured, and `pointermove` offsets it by the drag distance, so the same target/current machinery serves both mouse wheel and finger drag. The gap between `target` and `current` is what produces momentum: a flick pushes `target` ahead, and `current` coasts after it until the two converge.++The demo keeps all of this inside a scoped stage element with `overflow: hidden` — it never touches `window` scroll — so it embeds without hijacking the page.++## Key parameters++| Parameter | Typical | Effect |+|-----------|---------|--------|+| Ease / lerp factor | `0.05`–`0.2` | Fraction of the remaining gap closed per frame. Lower = heavier, floatier glide; higher = tighter, closer to native. |+| `maxScroll` | `content.scrollHeight − stage.clientHeight` | Clamp bound for `target`; recomputed on resize. |+| `deltaY` multiplier | `1` | Scales wheel input into scroll distance; raise for faster travel per notch. |+| Convergence epsilon | `~0.1px` | Snap `current` to `target` below this gap to end the loop cleanly and avoid sub-pixel jitter. |++A fixed lerp factor is frame-rate dependent — the same value settles faster on a 120Hz display than on 60Hz. For rate-independent easing, scale the factor by delta time: `1 - Math.pow(1 - ease, dt * 60)`.++## Production notes++- **Use a real library in production.** [Lenis](https://github.com/darkroomengineering/lenis) is the current standard; [Locomotive Scroll](https://github.com/locomotivemtl/locomotive-scroll) predates it. They handle wheel normalization across browsers, touch and trackpad quirks, anchor links, and integration hooks (e.g. GSAP ScrollTrigger) that a hand-rolled loop will miss.+- **Do not break keyboard and anchor scrolling.** Native scroll responds to Page Up/Down, Space, arrow keys, Home/End, tab-to-focus, and `#anchor` jumps. A naive hijack silently disables all of these. Real libraries re-implement them; if you roll your own, you must too.+- **Respect `prefers-reduced-motion`.** Smoothed scroll is exactly the kind of motion some users find disorienting or nauseating. When the user requests reduced motion, fall back to native, instant scroll with no lerp — this demo locks itself into native mode in that case.+- **Watch scroll-position pitfalls.** Because the real scroll position is faked with a transform, `position: sticky`, `scrollIntoView`, `IntersectionObserver` thresholds, and browser scroll restoration can all read the wrong offset. Anything that depends on native scroll geometry needs to be fed the smoothed value instead.+- **Don't hijack global scroll casually.** Taking over `window` scroll affects find-in-page, the scrollbar's drag behavior, and assistive tech. Scoping the effect to a contained element (as here) is safer; page-wide smoothing should be a deliberate, tested decision.+- **SEO and reliability.** Content is present in the DOM, so it remains crawlable, but any JS failure can leave the page unscrollable. Ensure a graceful fallback to native scroll if the script errors or never runs.++## See also++- [Parallax Scrolling](../parallax-scrolling/) — layers moved at different rates; pairs naturally with a smoothed scroll source.+- [Scrub Animation](../scrub-animation/) — driving a timeline from scroll position, the effect smooth scroll makes feel fluid.+- [Horizontal Scroll](../horizontal-scroll/) — converting vertical scroll into lateral motion, another scroll-remapping technique.diff --git a/animations/01-scroll-based/smooth-scroll/index.html b/animations/01-scroll-based/smooth-scroll/index.htmlnew file mode 100644index 00000000..4f3fda8a--- /dev/null+++ b/animations/01-scroll-based/smooth-scroll/index.html@@ -0,0 +1,197 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Smooth (Inertia) Scroll — Animation Handbook</title>+ <meta name="description" content="Wheel and touch input drive a target value; the content eases toward it each frame for a weighted, gliding feel.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/smooth-scroll/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Smooth (Inertia) Scroll — Animation Handbook">+ <meta property="og:description" content="Wheel and touch input drive a target value; the content eases toward it each frame for a weighted, gliding feel.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/smooth-scroll/">+ <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="Smooth (Inertia) Scroll — Animation Handbook">+ <meta name="twitter:description" content="Wheel and touch input drive a target value; the content eases toward it each frame for a weighted, gliding feel.">+ <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": "Smooth (Inertia) Scroll", "name": "Smooth (Inertia) Scroll", "description": "Wheel and touch input drive a target value; the content eases toward it each frame for a weighted, gliding feel.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/smooth-scroll/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Smooth (Inertia) Scroll"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#6ea8ff;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--stage-h:600px}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(16px,2.2vw,22px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ /* Masked viewport — inner content is translated, never scrolled natively (in smooth mode). */+ .stage{position:relative;height:var(--stage-h);overflow:hidden;border:1px solid var(--ui-border);border-radius:8px;touch-action:none;cursor:grab;background:var(--ui-bg)}+ .stage.native{overflow-y:auto;scrollbar-width:none;touch-action:auto;cursor:auto}+ .stage.native::-webkit-scrollbar{display:none}+ .stage.dragging{cursor:grabbing}+ .content{will-change:transform}+ .stage.native .content{will-change:auto}+ .card{padding:clamp(24px,5vw,52px);min-height:calc(var(--stage-h) * 0.72);display:flex;flex-direction:column;justify-content:center;border-bottom:1px solid var(--ui-border)}+ .card:last-child{border-bottom:0}+ .card-num{font-size:clamp(52px,9vw,88px);font-weight:bold;line-height:1;opacity:.12;margin-bottom:10px}+ .card-title{font-family:var(--disp);font-weight:700;font-size:clamp(20px,3.4vw,32px);margin-bottom:12px}+ .card-body{font-size:clamp(12px,1.4vw,14px);opacity:.6;line-height:1.7;max-width:460px}+ /* Progress rail, pinned to the stage viewport. */+ .rail{position:absolute;top:10px;right:10px;bottom:10px;width:4px;border-radius:2px;background:var(--ui-border);pointer-events:none}+ .rail-fill{position:absolute;top:0;left:0;width:100%;border-radius:2px;background:var(--ui-accent);transform-origin:top;height:24px}+ .hint{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);font-size:10px;letter-spacing:1px;opacity:.35;pointer-events:none}+ aside{width:clamp(210px,24vw,260px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:12px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+ .ctl{display:flex;flex-direction:column;gap:6px}+ .ctl .row{display:flex;justify-content:space-between;font-size:10px;color:var(--ui-muted)}+ .ctl .row .v{color:var(--ui-text)}+ input[type=range]{width:100%;height:44px;accent-color:var(--ui-accent);cursor:pointer}+ .toggle{display:flex;align-items:center;gap:10px;min-height:44px;font-size:11px;color:var(--ui-text);cursor:pointer}+ .toggle input{width:20px;height:20px;accent-color:var(--ui-accent);cursor:pointer}+ .toggle.disabled{opacity:.4;cursor:not-allowed}+ .div{height:1px;background:var(--ui-border)}+ .kv{display:flex;justify-content:space-between;font-size:10px;color:var(--ui-muted)}+ .kv .v{color:var(--ui-text)}+ @media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:460px}}+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../scroll-image-sequence/" rel="prev" title="Previous">‹ Prev</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/smooth-scroll/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Smooth (Inertia) Scroll</h1>+ <p>Wheel and touch input drive a target value; the content eases toward it each frame for a weighted, gliding feel.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage" id="stage">+ <div class="content" id="content"></div>+ <div class="rail"><div class="rail-fill" id="fill"></div></div>+ <div class="hint" id="hint">drag or scroll ↑↓</div>+ </div>+ </div>+ <aside>+ <p class="note">Native scroll snaps to the input instantly. Smooth scroll keeps a target and a current value, then lerps current toward target every frame: <code>current += (target − current) × ease</code>.</p>+ <div class="lbl">Ease / lerp factor</div>+ <div class="ctl">+ <input type="range" id="ease" min="0.05" max="0.2" step="0.01" value="0.09">+ <div class="row"><span>ease</span><span class="v" id="easeVal">0.09</span></div>+ <div class="row"><span>lower = heavier glide</span><span></span></div>+ </div>+ <div class="div"></div>+ <label class="toggle" id="nativeToggle"><input type="checkbox" id="nativeChk"><span>Compare: native scroll</span></label>+ <div class="div"></div>+ <div class="lbl">Live values</div>+ <div class="kv"><span>Target</span><span class="v" id="tVal">0</span></div>+ <div class="kv"><span>Current</span><span class="v" id="cVal">0</span></div>+ <div class="kv"><span>Progress</span><span class="v" id="pVal">0%</span></div>+ <div class="kv"><span>Mode</span><span class="v" id="mVal">smooth</span></div>+ </aside>+</div>+<script>+ const CARDS=[+ {title:'Captured Input', body:'The stage swallows wheel and pointer events instead of letting the browser scroll. Each gesture adds to a target value rather than moving the page directly.'},+ {title:'Target vs Current', body:'Two numbers are kept: where scroll wants to be (target) and where the content currently sits (current). The gap between them is what produces the glide.'},+ {title:'Lerp Each Frame', body:'On every animation frame, current moves a fraction of the way to target. A small fraction feels heavy and floaty; a larger fraction snaps closer to native.'},+ {title:'Transform, Not Scroll', body:'The eased value is written as translate3d on the inner content — a compositor-only property. No layout, no scrollTop thrash, just a moving surface.'},+ {title:'Momentum For Free', body:'Because current chases a target that already jumped ahead, releasing a flick lets the content coast to a stop. The easing is the momentum.'},+ {title:'Know The Trade-offs', body:'Hijacking scroll can break keyboard, anchor jumps, and find-in-page. Respect reduced-motion and never take over the whole document lightly.'},+ ];+ const stage=document.getElementById('stage'),content=document.getElementById('content'),fill=document.getElementById('fill');+ const easeInput=document.getElementById('ease'),easeVal=document.getElementById('easeVal');+ const nativeChk=document.getElementById('nativeChk'),nativeToggle=document.getElementById('nativeToggle');+ const tVal=document.getElementById('tVal'),cVal=document.getElementById('cVal'),pVal=document.getElementById('pVal'),mVal=document.getElementById('mVal'),hint=document.getElementById('hint');++ CARDS.forEach((c,i)=>{+ const el=document.createElement('div');el.className='card';+ el.innerHTML=`<div class="card-num">0${i+1}</div><div class="card-title">${c.title}</div><div class="card-body">${c.body}</div>`;+ content.appendChild(el);+ });++ const reduce=window.matchMedia('(prefers-reduced-motion: reduce)').matches;+ const clamp=(v,a,b)=>Math.min(Math.max(v,a),b);+ let target=0,current=0,ease=0.09,maxScroll=0,mode='smooth',dragging=false,startY=0,startTarget=0;++ function measure(){maxScroll=Math.max(0,content.scrollHeight-stage.clientHeight);target=clamp(target,0,maxScroll);}+ function progress(pos){return maxScroll>0?pos/maxScroll:0;}+ function paint(pos){+ const p=progress(pos);+ fill.style.transform=`translateY(${(p*(stage.clientHeight-44)).toFixed(1)}px)`;+ tVal.textContent=Math.round(target);cVal.textContent=Math.round(current);pVal.textContent=Math.round(p*100)+'%';+ }++ // Smooth mode: ease current toward target each frame, apply as transform.+ function loop(){+ if(mode!=='smooth'){return;}+ current+=(target-current)*ease;+ if(Math.abs(target-current)<0.1)current=target;+ content.style.transform=`translate3d(0,${(-current).toFixed(2)}px,0)`;+ paint(current);+ requestAnimationFrame(loop);+ }++ function onWheel(e){e.preventDefault();target=clamp(target+e.deltaY,0,maxScroll);}+ function onDown(e){dragging=true;startY=e.clientY;startTarget=target;stage.classList.add('dragging');stage.setPointerCapture(e.pointerId);}+ function onMove(e){if(!dragging)return;target=clamp(startTarget-(e.clientY-startY),0,maxScroll);}+ function onUp(){dragging=false;stage.classList.remove('dragging');}++ function enableSmooth(){+ measure();current=target=stage.scrollTop||current;stage.scrollTop=0;+ stage.classList.remove('native');mode='smooth';mVal.textContent='smooth';hint.textContent='drag or scroll ↑↓';+ stage.addEventListener('wheel',onWheel,{passive:false});+ stage.addEventListener('pointerdown',onDown);stage.addEventListener('pointermove',onMove);+ stage.addEventListener('pointerup',onUp);stage.addEventListener('pointercancel',onUp);+ requestAnimationFrame(loop);+ }+ function disableSmooth(){+ stage.removeEventListener('wheel',onWheel);+ stage.removeEventListener('pointerdown',onDown);stage.removeEventListener('pointermove',onMove);+ stage.removeEventListener('pointerup',onUp);stage.removeEventListener('pointercancel',onUp);+ }+ function enableNative(){+ disableSmooth();mode='native';mVal.textContent='native';hint.textContent='native scroll';+ content.style.transform='';stage.classList.add('native');+ stage.scrollTop=current;measure();+ stage.addEventListener('scroll',onNativeScroll,{passive:true});+ target=current=stage.scrollTop;paint(current);+ }+ function onNativeScroll(){current=target=stage.scrollTop;paint(current);}++ easeInput.addEventListener('input',()=>{ease=parseFloat(easeInput.value);easeVal.textContent=ease.toFixed(2);});+ nativeChk.addEventListener('change',()=>{+ if(nativeChk.checked){enableNative();}+ else{stage.removeEventListener('scroll',onNativeScroll);stage.classList.remove('native');enableSmooth();}+ });+ window.addEventListener('resize',measure);++ if(reduce){+ // Reduced motion: skip the lerp entirely, use native/instant scroll and lock the toggle on.+ nativeChk.checked=true;nativeChk.disabled=true;nativeToggle.classList.add('disabled');+ enableNative();+ }else{+ enableSmooth();+ }+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/01-scroll-based/snap-scrolling/README.md b/animations/01-scroll-based/snap-scrolling/README.mdindex 775d0e5e..a0c6612f 100644--- a/animations/01-scroll-based/snap-scrolling/README.md+++ b/animations/01-scroll-based/snap-scrolling/README.md@@ -59,7 +59,7 @@ const sectionIndex = Math.round(stage.scrollTop / sectionHeight);- **CSS is the entire mechanism.** Snap scrolling requires no JavaScript for the snapping itself. JS is only needed for auxiliary UI — pagination indicators, jump buttons, or syncing external state to the current section.- **`mandatory` vs. `proximity`.** Use `mandatory` when every section is viewport-height and partial views are never desirable. Use `proximity` when sections have varying heights or when you want snap behavior only on deliberate gestures. `mandatory` with small scroll steps (keyboard arrows) can feel locked and jarring.- **Mobile Safari.** iOS Safari has historically had issues with `scroll-snap-type` inside overflow containers. Test on real devices. Workarounds include using `overflow: auto` instead of `scroll`.-- **No library needed.** Unlike most other entries in this atlas, snap scrolling requires nothing beyond the browser. The feature is native and well-supported across all modern browsers.+- **No library needed.** Unlike most other entries in this handbook, snap scrolling requires nothing beyond the browser. The feature is native and well-supported across all modern browsers.- **Accessibility.** Snap scrolling can frustrate keyboard users who expect continuous scroll. Ensure the `Tab` key navigates between sections, section headings are focusable, and skip-nav links exist.## See alsodiff --git a/animations/01-scroll-based/snap-scrolling/index.html b/animations/01-scroll-based/snap-scrolling/index.htmlindex 011ff969..0da6f66b 100644--- a/animations/01-scroll-based/snap-scrolling/index.html+++ b/animations/01-scroll-based/snap-scrolling/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Snap Scrolling</title>+ <title>Snap Scrolling — Animation Handbook</title>+ <meta name="description" content="Page snaps to defined sections — CSS scroll-snap-type creates a deliberate paginated feel.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/snap-scrolling/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Snap Scrolling — Animation Handbook">+ <meta property="og:description" content="Page snaps to defined sections — CSS scroll-snap-type creates a deliberate paginated feel.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/snap-scrolling/">+ <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="Snap Scrolling — Animation Handbook">+ <meta name="twitter:description" content="Page snaps to defined sections — CSS scroll-snap-type creates a deliberate paginated feel.">+ <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": "Snap Scrolling", "name": "Snap Scrolling", "description": "Page snaps to defined sections — CSS scroll-snap-type creates a deliberate paginated feel.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/snap-scrolling/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Snap Scrolling"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -49,8 +63,22 @@/* Reduced motion: no smooth-scroll animation, no dot tweening */@media(prefers-reduced-motion:reduce){.stage{scroll-behavior:auto!important}.dot{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../pin-animation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../scrollytelling/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/snap-scrolling/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Snap Scrolling</h1><p>Page snaps to defined sections — CSS scroll-snap-type creates a deliberate paginated feel.</p>@@ -131,5 +159,6 @@dots.forEach((d,i)=>d.classList.toggle('active',i===idx));},{passive:true});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/stacking-cards/index.html b/animations/01-scroll-based/stacking-cards/index.htmlindex 56cd4228..2c04fbc0 100644--- a/animations/01-scroll-based/stacking-cards/index.html+++ b/animations/01-scroll-based/stacking-cards/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Stacking Cards</title>+ <title>Stacking Cards — Animation Handbook</title>+ <meta name="description" content="CSS Scroll-Driven Animations — sticky cards fan into a deck; exit-crossing timeline drives the scale.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/stacking-cards/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Stacking Cards — Animation Handbook">+ <meta property="og:description" content="CSS Scroll-Driven Animations — sticky cards fan into a deck; exit-crossing timeline drives the scale.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/stacking-cards/">+ <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="Stacking Cards — Animation Handbook">+ <meta name="twitter:description" content="CSS Scroll-Driven Animations — sticky cards fan into a deck; exit-crossing timeline drives the scale.">+ <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": "Stacking Cards", "name": "Stacking Cards", "description": "CSS Scroll-Driven Animations — sticky cards fan into a deck; exit-crossing timeline drives the scale.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/stacking-cards/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Stacking Cards"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -83,8 +97,22 @@}@media(prefers-reduced-motion:reduce){.card__content{animation:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../fly-in-fly-out-contact-list/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../scroll-trigger/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/stacking-cards/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Stacking Cards</h1><p>CSS Scroll-Driven Animations — sticky cards fan into a deck; exit-crossing timeline drives the scale.</p>@@ -202,5 +230,6 @@document.documentElement.style.setProperty('--scale-step',scaleStep);buildCards();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/stagger-reveal/index.html b/animations/01-scroll-based/stagger-reveal/index.htmlindex 12a5d926..dc4c8f9f 100644--- a/animations/01-scroll-based/stagger-reveal/index.html+++ b/animations/01-scroll-based/stagger-reveal/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Stagger Reveal</title>+ <title>Stagger Reveal — Animation Handbook</title>+ <meta name="description" content="Groups of elements reveal sequentially — the preview matrix shows cascade order before you scroll.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/stagger-reveal/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Stagger Reveal — Animation Handbook">+ <meta property="og:description" content="Groups of elements reveal sequentially — the preview matrix shows cascade order before you scroll.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/stagger-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="Stagger Reveal — Animation Handbook">+ <meta name="twitter:description" content="Groups of elements reveal sequentially — the preview matrix shows cascade order before you scroll.">+ <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": "Stagger Reveal", "name": "Stagger Reveal", "description": "Groups of elements reveal sequentially — the preview matrix shows cascade order before you scroll.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/stagger-reveal/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Stagger Reveal"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -56,8 +70,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}.grid{grid-template-columns:repeat(2,1fr)}}@media(prefers-reduced-motion:reduce){.item{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../reveal-on-scroll/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../horizontal-scroll/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/stagger-reveal/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Stagger Reveal</h1><p>Groups of elements reveal sequentially — the preview matrix shows cascade order before you scroll.</p>@@ -198,5 +226,6 @@},50);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/sticky-section/index.html b/animations/01-scroll-based/sticky-section/index.htmlindex 903cb3eb..a361817d 100644--- a/animations/01-scroll-based/sticky-section/index.html+++ b/animations/01-scroll-based/sticky-section/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Sticky Section</title>+ <title>Sticky Section — Animation Handbook</title>+ <meta name="description" content="The whole section pins to the viewport while its interior morphs through 4 states — scrubbed to scroll position.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/sticky-section/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Sticky Section — Animation Handbook">+ <meta property="og:description" content="The whole section pins to the viewport while its interior morphs through 4 states — scrubbed to scroll position.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/sticky-section/">+ <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="Sticky Section — Animation Handbook">+ <meta name="twitter:description" content="The whole section pins to the viewport while its interior morphs through 4 states — scrubbed to scroll position.">+ <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": "Sticky Section", "name": "Sticky Section", "description": "The whole section pins to the viewport while its interior morphs through 4 states — scrubbed to scroll position.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/sticky-section/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Sticky Section"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -50,8 +64,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}#sticky-inner{grid-template-columns:1fr}#vis-col{display:none}}@media(prefers-reduced-motion:reduce){.state,.illus{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../horizontal-scroll/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../counter-animation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/sticky-section/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Sticky Section</h1><p>The whole section pins to the viewport while its interior morphs through 4 states — scrubbed to scroll position.</p>@@ -178,5 +206,6 @@document.getElementById('rst').addEventListener('click',()=>{stage.scrollTop=0;update()});update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/01-scroll-based/zoom-into-image/index.html b/animations/01-scroll-based/zoom-into-image/index.htmlindex fc0ff83d..42c2d13b 100644--- a/animations/01-scroll-based/zoom-into-image/index.html+++ b/animations/01-scroll-based/zoom-into-image/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Zoom Into Image</title>+ <title>Zoom Into Image — Animation Handbook</title>+ <meta name="description" content="clip-path: inset() expands from a framed card to full-bleed as you scroll — the portal effect.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/zoom-into-image/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Zoom Into Image — Animation Handbook">+ <meta property="og:description" content="clip-path: inset() expands from a framed card to full-bleed as you scroll — the portal effect.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/zoom-into-image/">+ <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="Zoom Into Image — Animation Handbook">+ <meta name="twitter:description" content="clip-path: inset() expands from a framed card to full-bleed as you scroll — the portal effect.">+ <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": "Zoom Into Image", "name": "Zoom Into Image", "description": "clip-path: inset() expands from a framed card to full-bleed as you scroll — the portal effect.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/zoom-into-image/", "inLanguage": "en", "articleSection": "Scroll-Based", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Scroll-Based, Zoom Into Image"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -47,8 +61,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:460px}}@media(prefers-reduced-motion:reduce){#zoom-img{clip-path:inset(0% round 0px)!important}#caption{opacity:1!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../section-wipe/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../scroll-image-sequence/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/01-scroll-based/zoom-into-image/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Zoom Into Image</h1><p>clip-path: inset() expands from a framed card to full-bleed as you scroll — the portal effect.</p>@@ -166,5 +194,6 @@document.getElementById('rst').addEventListener('click',()=>{stage.scrollTop=0;update()});update();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/blur-in/index.html b/animations/02-entrance-and-exit/blur-in/index.htmlindex 9c9a60f4..a4baf863 100644--- a/animations/02-entrance-and-exit/blur-in/index.html+++ b/animations/02-entrance-and-exit/blur-in/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Blur In</title>+ <title>Blur In — Animation Handbook</title>+ <meta name="description" content="Fades in while transitioning from blurred to sharp — mimics a camera pulling focus.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/blur-in/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Blur In — Animation Handbook">+ <meta property="og:description" content="Fades in while transitioning from blurred to sharp — mimics a camera pulling focus.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/blur-in/">+ <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="Blur In — Animation Handbook">+ <meta name="twitter:description" content="Fades in while transitioning from blurred to sharp — mimics a camera pulling focus.">+ <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": "Blur In", "name": "Blur In", "description": "Fades in while transitioning from blurred to sharp — mimics a camera pulling focus.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/blur-in/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Blur In"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -52,8 +66,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../word-by-word-reveal/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../flip-in/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/blur-in/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Blur In</h1><p>Fades in while transitioning from blurred to sharp — mimics a camera pulling focus.</p>@@ -137,5 +165,6 @@easeSel.addEventListener('change',()=>document.documentElement.style.setProperty('--ease',easeSel.value));slideTog.addEventListener('change',()=>document.documentElement.style.setProperty('--ty',slideTog.checked?'-8px':'0px'));</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/bounce-in/index.html b/animations/02-entrance-and-exit/bounce-in/index.htmlindex 65894f46..a6d7f1a8 100644--- a/animations/02-entrance-and-exit/bounce-in/index.html+++ b/animations/02-entrance-and-exit/bounce-in/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Bounce In</title>+ <title>Bounce In — Animation Handbook</title>+ <meta name="description" content="Overshoots final position then springs back — implemented with explicit @keyframes waypoints, not easing alone.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/bounce-in/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Bounce In — Animation Handbook">+ <meta property="og:description" content="Overshoots final position then springs back — implemented with explicit @keyframes waypoints, not easing alone.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/bounce-in/">+ <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="Bounce In — Animation Handbook">+ <meta name="twitter:description" content="Overshoots final position then springs back — implemented with explicit @keyframes waypoints, not easing alone.">+ <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": "Bounce In", "name": "Bounce In", "description": "Overshoots final position then springs back — implemented with explicit @keyframes waypoints, not easing alone.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/bounce-in/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Bounce In"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -49,8 +63,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style><style id="kf-style"></style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../flip-in/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../rotate-in/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/bounce-in/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Bounce In</h1><p>Overshoots final position then springs back — implemented with explicit @keyframes waypoints, not easing alone.</p>@@ -167,5 +195,6 @@fadeTog.addEventListener('change',()=>buildKF(+ovSl.value,bounces));buildKF(60,1);</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/clip-path-reveal/index.html b/animations/02-entrance-and-exit/clip-path-reveal/index.htmlindex 1be4a5b9..812f1122 100644--- a/animations/02-entrance-and-exit/clip-path-reveal/index.html+++ b/animations/02-entrance-and-exit/clip-path-reveal/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Clip-Path Reveal</title>+ <title>Clip-Path Reveal — Animation Handbook</title>+ <meta name="description" content="A shape mask expands to uncover the element — content is fully rendered the whole time, just progressively visible.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/clip-path-reveal/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Clip-Path Reveal — Animation Handbook">+ <meta property="og:description" content="A shape mask expands to uncover the element — content is fully rendered the whole time, just progressively visible.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/clip-path-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="Clip-Path Reveal — Animation Handbook">+ <meta name="twitter:description" content="A shape mask expands to uncover the element — content is fully rendered the whole time, just progressively visible.">+ <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": "Clip-Path Reveal", "name": "Clip-Path Reveal", "description": "A shape mask expands to uncover the element — content is fully rendered the whole time, just progressively visible.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/clip-path-reveal/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Clip-Path Reveal"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -49,8 +63,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:480px}.stage{flex:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../scale-in/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../curtain-reveal/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/clip-path-reveal/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Clip-Path Reveal</h1><p>A shape mask expands to uncover the element — content is fully rendered the whole time, just progressively visible.</p>@@ -171,5 +199,6 @@outlineTog.addEventListener('change',()=>outline.classList.toggle('show',outlineTog.checked));applyClips();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/curtain-reveal/index.html b/animations/02-entrance-and-exit/curtain-reveal/index.htmlindex 05baad3e..b38fc50b 100644--- a/animations/02-entrance-and-exit/curtain-reveal/index.html+++ b/animations/02-entrance-and-exit/curtain-reveal/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Curtain Reveal</title>+ <title>Curtain Reveal — Animation Handbook</title>+ <meta name="description" content="A colored bar slides over content then off the other side — the reveal is hidden then exposed.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/curtain-reveal/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Curtain Reveal — Animation Handbook">+ <meta property="og:description" content="A colored bar slides over content then off the other side — the reveal is hidden then exposed.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/curtain-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="Curtain Reveal — Animation Handbook">+ <meta name="twitter:description" content="A colored bar slides over content then off the other side — the reveal is hidden then exposed.">+ <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": "Curtain Reveal", "name": "Curtain Reveal", "description": "A colored bar slides over content then off the other side — the reveal is hidden then exposed.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/curtain-reveal/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Curtain Reveal"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -67,8 +81,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../clip-path-reveal/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../split-text-reveal/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/curtain-reveal/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Curtain Reveal</h1><p>A colored bar slides over content then off the other side — the reveal is hidden then exposed.</p>@@ -193,5 +221,6 @@pauseSl.addEventListener('input',()=>{pause=+pauseSl.value;pauseV.textContent=pause+'ms'});twinTog.addEventListener('change',()=>{twin=twinTog.checked;clearCurtains()});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/fade-in-out/index.html b/animations/02-entrance-and-exit/fade-in-out/index.htmlindex ce3f1265..56a86053 100644--- a/animations/02-entrance-and-exit/fade-in-out/index.html+++ b/animations/02-entrance-and-exit/fade-in-out/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Fade In / Fade Out</title>+ <title>Fade In / Fade Out — Animation Handbook</title>+ <meta name="description" content="Opacity 0 → 1 enter, 1 → 0 exit. The compositor handles this without re-painting.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/fade-in-out/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Fade In / Fade Out — Animation Handbook">+ <meta property="og:description" content="Opacity 0 → 1 enter, 1 → 0 exit. The compositor handles this without re-painting.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/fade-in-out/">+ <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="Fade In / Fade Out — Animation Handbook">+ <meta name="twitter:description" content="Opacity 0 → 1 enter, 1 → 0 exit. The compositor handles this without re-painting.">+ <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": "Fade In / Fade Out", "name": "Fade In / Fade Out", "description": "Opacity 0 → 1 enter, 1 → 0 exit. The compositor handles this without re-painting.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/fade-in-out/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Fade In / Fade Out"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -42,8 +56,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../slide-in/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/fade-in-out/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Fade In / Fade Out</h1><p>Opacity 0 → 1 enter, 1 → 0 exit. The compositor handles this without re-painting.</p>@@ -127,5 +155,6 @@easeSel.addEventListener('change',()=>document.documentElement.style.setProperty('--ease',easeSel.value));holdSl.addEventListener('input',()=>{hold=+holdSl.value;holdV.textContent=(hold/1000).toFixed(1)+'s'});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/flip-in/index.html b/animations/02-entrance-and-exit/flip-in/index.htmlindex a5755240..3752aefe 100644--- a/animations/02-entrance-and-exit/flip-in/index.html+++ b/animations/02-entrance-and-exit/flip-in/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Flip In</title>+ <title>Flip In — Animation Handbook</title>+ <meta name="description" content="Rotates from a flat plane into view using CSS 3D perspective — perspective on the parent is the key.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/flip-in/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Flip In — Animation Handbook">+ <meta property="og:description" content="Rotates from a flat plane into view using CSS 3D perspective — perspective on the parent is the key.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/flip-in/">+ <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="Flip In — Animation Handbook">+ <meta name="twitter:description" content="Rotates from a flat plane into view using CSS 3D perspective — perspective on the parent is the key.">+ <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": "Flip In", "name": "Flip In", "description": "Rotates from a flat plane into view using CSS 3D perspective — perspective on the parent is the key.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/flip-in/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Flip In"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -46,8 +60,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../blur-in/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../bounce-in/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/flip-in/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Flip In</h1><p>Rotates from a flat plane into view using CSS 3D perspective — perspective on the parent is the key.</p>@@ -155,5 +183,6 @@fadeTog.addEventListener('change',()=>{card.style.opacity=fadeTog.checked?'':'1'});applyRot();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>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.htmlindex 76054d75..994f20f5 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@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Letter-by-Letter Stagger</title>+ <title>Letter-by-Letter Stagger — Animation Handbook</title>+ <meta name="description" content="Cascade: CSS transition-delay per letter. Typewriter: JS sequential reveal with a blinking cursor.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/letter-by-letter-stagger/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Letter-by-Letter Stagger — Animation Handbook">+ <meta property="og:description" content="Cascade: CSS transition-delay per letter. Typewriter: JS sequential reveal with a blinking cursor.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/letter-by-letter-stagger/">+ <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="Letter-by-Letter Stagger — Animation Handbook">+ <meta name="twitter:description" content="Cascade: CSS transition-delay per letter. Typewriter: JS sequential reveal with a blinking cursor.">+ <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": "Letter-by-Letter Stagger", "name": "Letter-by-Letter Stagger", "description": "Cascade: CSS transition-delay per letter. Typewriter: JS sequential reveal with a blinking cursor.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/letter-by-letter-stagger/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Letter-by-Letter Stagger"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -53,8 +67,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../split-text-reveal/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../word-by-word-reveal/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/letter-by-letter-stagger/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Letter-by-Letter Stagger</h1><p>Cascade: CSS transition-delay per letter. Typewriter: JS sequential reveal with a blinking cursor.</p>@@ -178,5 +206,6 @@txtIn.addEventListener('input',reset);cursorTog.addEventListener('change',reset);buildSpans();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/rotate-in/index.html b/animations/02-entrance-and-exit/rotate-in/index.htmlindex 5771bc81..c700477a 100644--- a/animations/02-entrance-and-exit/rotate-in/index.html+++ b/animations/02-entrance-and-exit/rotate-in/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Rotate In</title>+ <title>Rotate In — Animation Handbook</title>+ <meta name="description" content="Spins while entering — best on radially-symmetric shapes like icons, stars, and gears.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/rotate-in/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Rotate In — Animation Handbook">+ <meta property="og:description" content="Spins while entering — best on radially-symmetric shapes like icons, stars, and gears.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/rotate-in/">+ <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="Rotate In — Animation Handbook">+ <meta name="twitter:description" content="Spins while entering — best on radially-symmetric shapes like icons, stars, and gears.">+ <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": "Rotate In", "name": "Rotate In", "description": "Spins while entering — best on radially-symmetric shapes like icons, stars, and gears.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/rotate-in/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Rotate In"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -49,8 +63,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../bounce-in/" rel="prev" title="Previous">‹ Prev</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/rotate-in/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Rotate In</h1><p>Spins while entering — best on radially-symmetric shapes like icons, stars, and gears.</p>@@ -160,5 +188,6 @@scaleTog.addEventListener('change',applyRot);fadeTog.addEventListener('change',applyRot);applyRot();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/scale-in/index.html b/animations/02-entrance-and-exit/scale-in/index.htmlindex 2ef915f3..5ff91f58 100644--- a/animations/02-entrance-and-exit/scale-in/index.html+++ b/animations/02-entrance-and-exit/scale-in/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Scale In / Zoom In</title>+ <title>Scale In / Zoom In — Animation Handbook</title>+ <meta name="description" content="Scales from a small start value to 1.0 — transform-origin changes where the pop expands from.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/scale-in/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Scale In / Zoom In — Animation Handbook">+ <meta property="og:description" content="Scales from a small start value to 1.0 — transform-origin changes where the pop expands from.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/scale-in/">+ <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="Scale In / Zoom In — Animation Handbook">+ <meta name="twitter:description" content="Scales from a small start value to 1.0 — transform-origin changes where the pop expands from.">+ <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": "Scale In / Zoom In", "name": "Scale In / Zoom In", "description": "Scales from a small start value to 1.0 — transform-origin changes where the pop expands from.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/scale-in/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Scale In / Zoom In"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -46,8 +60,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../slide-up-reveal/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../clip-path-reveal/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/scale-in/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Scale In / Zoom In</h1><p>Scales from a small start value to 1.0 — transform-origin changes where the pop expands from.</p>@@ -131,5 +159,6 @@easeSel.addEventListener('change',()=>document.documentElement.style.setProperty('--ease',easeSel.value));fadeTog.addEventListener('change',()=>document.documentElement.style.setProperty('--fade-opacity',fadeTog.checked?'0':'1'));</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/slide-in/index.html b/animations/02-entrance-and-exit/slide-in/index.htmlindex c119822b..8c9b6f6c 100644--- a/animations/02-entrance-and-exit/slide-in/index.html+++ b/animations/02-entrance-and-exit/slide-in/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Slide In</title>+ <title>Slide In — Animation Handbook</title>+ <meta name="description" content="Translates from off-screen edge into final position — with or without simultaneous fade.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/slide-in/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Slide In — Animation Handbook">+ <meta property="og:description" content="Translates from off-screen edge into final position — with or without simultaneous fade.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/slide-in/">+ <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="Slide In — Animation Handbook">+ <meta name="twitter:description" content="Translates from off-screen edge into final position — with or without simultaneous fade.">+ <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": "Slide In", "name": "Slide In", "description": "Translates from off-screen edge into final position — with or without simultaneous fade.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/slide-in/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Slide In"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -47,8 +61,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../fade-in-out/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../slide-up-reveal/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/slide-in/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Slide In</h1><p>Translates from off-screen edge into final position — with or without simultaneous fade.</p>@@ -149,5 +177,6 @@fadeTog.addEventListener('change',()=>{withFade=fadeTog.checked;applyDir()});applyDir();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/slide-up-reveal/index.html b/animations/02-entrance-and-exit/slide-up-reveal/index.htmlindex 696a391e..f90b9729 100644--- a/animations/02-entrance-and-exit/slide-up-reveal/index.html+++ b/animations/02-entrance-and-exit/slide-up-reveal/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Slide Up Reveal</title>+ <title>Slide Up Reveal — Animation Handbook</title>+ <meta name="description" content="Text rises from below its clip boundary — two technique variants with identical visual results.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/slide-up-reveal/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Slide Up Reveal — Animation Handbook">+ <meta property="og:description" content="Text rises from below its clip boundary — two technique variants with identical visual results.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/slide-up-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="Slide Up Reveal — Animation Handbook">+ <meta name="twitter:description" content="Text rises from below its clip boundary — two technique variants with identical visual results.">+ <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": "Slide Up Reveal", "name": "Slide Up Reveal", "description": "Text rises from below its clip boundary — two technique variants with identical visual results.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/slide-up-reveal/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Slide Up Reveal"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -48,8 +62,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../slide-in/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../scale-in/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/slide-up-reveal/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Slide Up Reveal</h1><p>Text rises from below its clip boundary — two technique variants with identical visual results.</p>@@ -143,5 +171,6 @@stEl.textContent='hidden';});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/02-entrance-and-exit/split-text-reveal/index.html b/animations/02-entrance-and-exit/split-text-reveal/index.htmlindex b3123980..38d238f6 100644--- a/animations/02-entrance-and-exit/split-text-reveal/index.html+++ b/animations/02-entrance-and-exit/split-text-reveal/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Split Text Reveal</title>+ <title>Split Text Reveal — Animation Handbook</title>+ <meta name="description" content="Text split into chars, words, or lines — each piece animates with a staggered delay via --index.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/split-text-reveal/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Split Text Reveal — Animation Handbook">+ <meta property="og:description" content="Text split into chars, words, or lines — each piece animates with a staggered delay via --index.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/split-text-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="Split Text Reveal — Animation Handbook">+ <meta name="twitter:description" content="Text split into chars, words, or lines — each piece animates with a staggered delay via --index.">+ <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": "Split Text Reveal", "name": "Split Text Reveal", "description": "Text split into chars, words, or lines — each piece animates with a staggered delay via --index.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/split-text-reveal/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Split Text Reveal"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -59,8 +73,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../curtain-reveal/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../letter-by-letter-stagger/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/split-text-reveal/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Split Text Reveal</h1><p>Text split into chars, words, or lines — each piece animates with a staggered delay via --index.</p>@@ -183,5 +211,6 @@txtIn.addEventListener('input',()=>{stopLoop();target.classList.remove('in');split();stEl.textContent='hidden'});split();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>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.htmlindex 3d6501cd..4ca07028 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@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Word-by-Word Reveal</title>+ <title>Word-by-Word Reveal — Animation Handbook</title>+ <meta name="description" content="Words animate sequentially — 80–120ms per word matches comfortable reading speed.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/word-by-word-reveal/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Word-by-Word Reveal — Animation Handbook">+ <meta property="og:description" content="Words animate sequentially — 80–120ms per word matches comfortable reading speed.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/word-by-word-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="Word-by-Word Reveal — Animation Handbook">+ <meta name="twitter:description" content="Words animate sequentially — 80–120ms per word matches comfortable reading speed.">+ <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": "Word-by-Word Reveal", "name": "Word-by-Word Reveal", "description": "Words animate sequentially — 80–120ms per word matches comfortable reading speed.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/word-by-word-reveal/", "inLanguage": "en", "articleSection": "Entrance & Exit", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Entrance & Exit, Word-by-Word Reveal"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -47,8 +61,22 @@@media(hover:hover){button.act:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../letter-by-letter-stagger/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../blur-in/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/02-entrance-and-exit/word-by-word-reveal/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Word-by-Word Reveal</h1><p>Words animate sequentially — 80–120ms per word matches comfortable reading speed.</p>@@ -163,5 +191,6 @@ Software made with care.</textarea>txtIn.addEventListener('input',()=>{stopLoop();target.classList.remove('in');buildWords();stEl.textContent='hidden'});buildWords();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/blur-transition/index.html b/animations/03-page-transitions/blur-transition/index.htmlindex 5cf4ad31..bf2ac9f5 100644--- a/animations/03-page-transitions/blur-transition/index.html+++ b/animations/03-page-transitions/blur-transition/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Blur Transition</title>+ <title>Blur Transition — Animation Handbook</title>+ <meta name="description" content="Current page blurs and fades out, then new page sharpens in — a defocus wipe between scenes.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/blur-transition/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Blur Transition — Animation Handbook">+ <meta property="og:description" content="Current page blurs and fades out, then new page sharpens in — a defocus wipe between scenes.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/blur-transition/">+ <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="Blur Transition — Animation Handbook">+ <meta name="twitter:description" content="Current page blurs and fades out, then new page sharpens in — a defocus wipe between scenes.">+ <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": "Blur Transition", "name": "Blur Transition", "description": "Current page blurs and fades out, then new page sharpens in — a defocus wipe between scenes.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/blur-transition/", "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, Blur Transition"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -54,8 +68,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){.page{transition:none!important;filter:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../flash-transition/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../elastic-transition/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/blur-transition/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Blur Transition</h1><p>Current page blurs and fades out, then new page sharpens in — a defocus wipe between scenes.</p>@@ -162,5 +190,6 @@blurVal.textContent='0';animating=false;});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/crossfade/index.html b/animations/03-page-transitions/crossfade/index.htmlindex 80e01a1a..6c52c5e7 100644--- a/animations/03-page-transitions/crossfade/index.html+++ b/animations/03-page-transitions/crossfade/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Crossfade Transition</title>+ <title>Crossfade Transition — Animation Handbook</title>+ <meta name="description" content="Both pages overlap simultaneously mid-transition — compare with sequential fade-out then fade-in.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/crossfade/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Crossfade Transition — Animation Handbook">+ <meta property="og:description" content="Both pages overlap simultaneously mid-transition — compare with sequential fade-out then fade-in.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/crossfade/">+ <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="Crossfade Transition — Animation Handbook">+ <meta name="twitter:description" content="Both pages overlap simultaneously mid-transition — compare with sequential fade-out then fade-in.">+ <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": "Crossfade Transition", "name": "Crossfade Transition", "description": "Both pages overlap simultaneously mid-transition — compare with sequential fade-out then fade-in.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/crossfade/", "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, Crossfade Transition"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -55,8 +69,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){.page{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../morph-transition/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../slide-transition/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/crossfade/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Crossfade Transition</h1><p>Both pages overlap simultaneously mid-transition — compare with sequential fade-out then fade-in.</p>@@ -170,5 +198,6 @@durSl.addEventListener('input',()=>{dur=+durSl.value;durV.textContent=dur+'ms';document.documentElement.style.setProperty('--dur',dur+'ms')});document.getElementById('rst-btn').addEventListener('click',()=>{if(animating)return;const p=current;current=0;updateNav(0);if(p!==0)addLog(p,0);document.querySelectorAll('.page').forEach((el,i)=>{el.classList.toggle('active',i===0);el.style.cssText=''});animating=false;});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/dissolve/index.html b/animations/03-page-transitions/dissolve/index.htmlindex 7da652fe..544bf603 100644--- a/animations/03-page-transitions/dissolve/index.html+++ b/animations/03-page-transitions/dissolve/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Dissolve Transition</title>+ <title>Dissolve Transition — Animation Handbook</title>+ <meta name="description" content="Random tiles fade at staggered delays — a non-uniform wipe that reads as dissolving rather than fading.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/dissolve/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Dissolve Transition — Animation Handbook">+ <meta property="og:description" content="Random tiles fade at staggered delays — a non-uniform wipe that reads as dissolving rather than fading.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/dissolve/">+ <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="Dissolve Transition — Animation Handbook">+ <meta name="twitter:description" content="Random tiles fade at staggered delays — a non-uniform wipe that reads as dissolving rather than fading.">+ <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": "Dissolve Transition", "name": "Dissolve Transition", "description": "Random tiles fade at staggered delays — a non-uniform wipe that reads as dissolving rather than fading.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/dissolve/", "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, Dissolve Transition"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -54,8 +68,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){.page{transition:opacity 300ms linear}.dtile{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../portal-zoom/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../flip-technique/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/dissolve/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Dissolve Transition</h1><p>Random tiles fade at staggered delays — a non-uniform wipe that reads as dissolving rather than fading.</p>@@ -183,5 +211,6 @@overlay.innerHTML='';document.querySelectorAll('.page').forEach((el,i)=>{el.classList.toggle('active',i===0);el.style.opacity=i===0?'1':'0'});animating=false;});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/elastic-transition/index.html b/animations/03-page-transitions/elastic-transition/index.htmlindex 571b021d..983988fd 100644--- a/animations/03-page-transitions/elastic-transition/index.html+++ b/animations/03-page-transitions/elastic-transition/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Elastic Transition</title>+ <title>Elastic Transition — Animation Handbook</title>+ <meta name="description" content="Spring physics cause overshoot and oscillation before settling — CSS keyframes or live JS simulation.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/elastic-transition/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Elastic Transition — Animation Handbook">+ <meta property="og:description" content="Spring physics cause overshoot and oscillation before settling — CSS keyframes or live JS simulation.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/elastic-transition/">+ <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="Elastic Transition — Animation Handbook">+ <meta name="twitter:description" content="Spring physics cause overshoot and oscillation before settling — CSS keyframes or live JS simulation.">+ <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": "Elastic Transition", "name": "Elastic Transition", "description": "Spring physics cause overshoot and oscillation before settling — CSS keyframes or live JS simulation.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/elastic-transition/", "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, Elastic Transition"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -53,8 +67,22 @@@media(prefers-reduced-motion:reduce){.page{transition:none!important;animation:none!important}}</style><style id="kf-style"></style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../blur-transition/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../portal-zoom/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/elastic-transition/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Elastic Transition</h1><p>Spring physics cause overshoot and oscillation before settling — CSS keyframes or live JS simulation.</p>@@ -220,5 +248,6 @@});buildKF(60);</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/flash-transition/index.html b/animations/03-page-transitions/flash-transition/index.htmlindex 847549f3..8572f590 100644--- a/animations/03-page-transitions/flash-transition/index.html+++ b/animations/03-page-transitions/flash-transition/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Flash / Light Leak Transition</title>+ <title>Flash / Light Leak Transition — Animation Handbook</title>+ <meta name="description" content="A colored flash peaks at full opacity, hides the page swap, then fades to reveal the new scene.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/flash-transition/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Flash / Light Leak Transition — Animation Handbook">+ <meta property="og:description" content="A colored flash peaks at full opacity, hides the page swap, then fades to reveal the new scene.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/flash-transition/">+ <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="Flash / Light Leak Transition — Animation Handbook">+ <meta name="twitter:description" content="A colored flash peaks at full opacity, hides the page swap, then fades to reveal the new scene.">+ <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": "Flash / Light Leak Transition", "name": "Flash / Light Leak Transition", "description": "A colored flash peaks at full opacity, hides the page swap, then fades to reveal the new scene.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/flash-transition/", "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, Flash / Light Leak Transition"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -61,8 +75,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){#flash-overlay{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../zoom-transition/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../blur-transition/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/flash-transition/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Flash / Light Leak Transition</h1><p>A colored flash peaks at full opacity, hides the page swap, then fades to reveal the new scene.</p>@@ -173,5 +201,6 @@flashEl.style.opacity='0';document.querySelectorAll('.page').forEach((el,i)=>el.classList.toggle('active',i===0));stageVal.textContent='idle';animating=false;});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/flip-technique/index.html b/animations/03-page-transitions/flip-technique/index.htmlindex c190476b..25591952 100644--- a/animations/03-page-transitions/flip-technique/index.html+++ b/animations/03-page-transitions/flip-technique/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>FLIP Technique</title>+ <title>FLIP Technique — Animation Handbook</title>+ <meta name="description" content="First-Last-Invert-Play — CSS layout changes animated seamlessly by measuring position deltas.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/flip-technique/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="FLIP Technique — Animation Handbook">+ <meta property="og:description" content="First-Last-Invert-Play — CSS layout changes animated seamlessly by measuring position deltas.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/flip-technique/">+ <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="FLIP Technique — Animation Handbook">+ <meta name="twitter:description" content="First-Last-Invert-Play — CSS layout changes animated seamlessly by measuring position deltas.">+ <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": "FLIP Technique", "name": "FLIP Technique", "description": "First-Last-Invert-Play — CSS layout changes animated seamlessly by measuring position deltas.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/flip-technique/", "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, FLIP Technique"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -47,8 +61,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){.flip-card{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../dissolve/" rel="prev" title="Previous">‹ Prev</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/flip-technique/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>FLIP Technique</h1><p>First-Last-Invert-Play — CSS layout changes animated seamlessly by measuring position deltas.</p>@@ -172,5 +200,6 @@});renderCards();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/morph-transition/index.html b/animations/03-page-transitions/morph-transition/index.htmlindex d66e1d66..8403b07a 100644--- a/animations/03-page-transitions/morph-transition/index.html+++ b/animations/03-page-transitions/morph-transition/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Morph Transition</title>+ <title>Morph Transition — Animation Handbook</title>+ <meta name="description" content="An SVG path morphs between page-specific shapes — interpolating point-by-point using matching vertex counts.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/morph-transition/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Morph Transition — Animation Handbook">+ <meta property="og:description" content="An SVG path morphs between page-specific shapes — interpolating point-by-point using matching vertex counts.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/morph-transition/">+ <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="Morph Transition — Animation Handbook">+ <meta name="twitter:description" content="An SVG path morphs between page-specific shapes — interpolating point-by-point using matching vertex counts.">+ <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": "Morph Transition", "name": "Morph Transition", "description": "An SVG path morphs between page-specific shapes — interpolating point-by-point using matching vertex counts.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/morph-transition/", "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, Morph Transition"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -58,8 +72,22 @@@media(hover:hover){button.rst:hover{border-color:var(--ui-accent);color:var(--ui-accent)}.nav-btn:hover{border-color:var(--ui-accent)}}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../shared-element-transition/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../crossfade/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/morph-transition/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Morph Transition</h1><p>An SVG path morphs between page-specific shapes — interpolating point-by-point using matching vertex counts.</p>@@ -194,5 +222,6 @@if(motionOk)startMorph(currentPts,circle12,()=>{currentPts=[...circle12];shapeVal.textContent='Circle';morphPath.setAttribute('fill',SHAPES[0].color);document.querySelectorAll('.shape-btn').forEach((x,j)=>x.classList.toggle('on',j===0));animating=false;});});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/portal-zoom/index.html b/animations/03-page-transitions/portal-zoom/index.htmlindex 401c9d78..fc50e905 100644--- a/animations/03-page-transitions/portal-zoom/index.html+++ b/animations/03-page-transitions/portal-zoom/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Portal / Tunnel Zoom</title>+ <title>Portal / Tunnel Zoom — Animation Handbook</title>+ <meta name="description" content="Zooming through a portal element — clip-path expands from the portal's center to fill the stage.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/portal-zoom/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Portal / Tunnel Zoom — Animation Handbook">+ <meta property="og:description" content="Zooming through a portal element — clip-path expands from the portal's center to fill the stage.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/portal-zoom/">+ <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="Portal / Tunnel Zoom — Animation Handbook">+ <meta name="twitter:description" content="Zooming through a portal element — clip-path expands from the portal's center to fill the stage.">+ <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": "Portal / Tunnel Zoom", "name": "Portal / Tunnel Zoom", "description": "Zooming through a portal element — clip-path expands from the portal's center to fill the stage.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/portal-zoom/", "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, Portal / Tunnel Zoom"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -57,8 +71,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){#zoom-mask{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../elastic-transition/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../dissolve/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/portal-zoom/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Portal / Tunnel Zoom</h1><p>Zooming through a portal element — clip-path expands from the portal's center to fill the stage.</p>@@ -173,5 +201,6 @@document.querySelectorAll('.page').forEach((el,i)=>el.classList.toggle('active',i===0));zoomMask.style.clipPath='circle(0%)';zoomMask.classList.remove('expanding');animating=false;});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/shared-element-transition/index.html b/animations/03-page-transitions/shared-element-transition/index.htmlindex 597c7fb1..519022aa 100644--- a/animations/03-page-transitions/shared-element-transition/index.html+++ b/animations/03-page-transitions/shared-element-transition/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Shared Element Transition</title>+ <title>Shared Element Transition — Animation Handbook</title>+ <meta name="description" content="FLIP technique — a thumbnail morphs continuously into a hero as pages change.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/shared-element-transition/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Shared Element Transition — Animation Handbook">+ <meta property="og:description" content="FLIP technique — a thumbnail morphs continuously into a hero as pages change.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/shared-element-transition/">+ <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="Shared Element Transition — Animation Handbook">+ <meta name="twitter:description" content="FLIP technique — a thumbnail morphs continuously into a hero as pages change.">+ <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": "Shared Element Transition", "name": "Shared Element Transition", "description": "FLIP technique — a thumbnail morphs continuously into a hero as pages change.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/shared-element-transition/", "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, Shared Element Transition"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -54,8 +68,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}#page-grid{grid-template-columns:1fr 1fr}}@media(prefers-reduced-motion:reduce){#flip-el{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../view-transitions-api/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../morph-transition/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/shared-element-transition/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Shared Element Transition</h1><p>FLIP technique — a thumbnail morphs continuously into a hero as pages change.</p>@@ -170,5 +198,6 @@durSl.addEventListener('input',()=>{dur=+durSl.value;durV.textContent=dur+'ms'});document.getElementById('rst-btn').addEventListener('click',closeDetail);</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/slide-transition/index.html b/animations/03-page-transitions/slide-transition/index.htmlindex a502e368..1746be07 100644--- a/animations/03-page-transitions/slide-transition/index.html+++ b/animations/03-page-transitions/slide-transition/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Slide Transition</title>+ <title>Slide Transition — Animation Handbook</title>+ <meta name="description" content="Directional slides — forward navigation goes left, backward goes right, matching native app patterns.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/slide-transition/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Slide Transition — Animation Handbook">+ <meta property="og:description" content="Directional slides — forward navigation goes left, backward goes right, matching native app patterns.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/slide-transition/">+ <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="Slide Transition — Animation Handbook">+ <meta name="twitter:description" content="Directional slides — forward navigation goes left, backward goes right, matching native app patterns.">+ <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": "Slide Transition", "name": "Slide Transition", "description": "Directional slides — forward navigation goes left, backward goes right, matching native app patterns.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/slide-transition/", "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, Slide Transition"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -49,8 +63,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){.page{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../crossfade/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../zoom-transition/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/slide-transition/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Slide Transition</h1><p>Directional slides — forward navigation goes left, backward goes right, matching native app patterns.</p>@@ -169,5 +197,6 @@document.querySelectorAll('.page').forEach((el,i)=>{el.classList.toggle('active',i===0);el.style.transform=i===0?'':'translateX(100%)';el.style.transition=''});animating=false;});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/view-transitions-api/index.html b/animations/03-page-transitions/view-transitions-api/index.htmlindex 911a8313..1cc309f6 100644--- a/animations/03-page-transitions/view-transitions-api/index.html+++ b/animations/03-page-transitions/view-transitions-api/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>View Transitions API</title>+ <title>View Transitions API — Animation Handbook</title>+ <meta name="description" content="document.startViewTransition() — the browser captures before/after and animates automatically.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/view-transitions-api/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="View Transitions API — Animation Handbook">+ <meta property="og:description" content="document.startViewTransition() — the browser captures before/after and animates automatically.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/view-transitions-api/">+ <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="View Transitions API — Animation Handbook">+ <meta name="twitter:description" content="document.startViewTransition() — the browser captures before/after and animates automatically.">+ <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": "View Transitions API", "name": "View Transitions API", "description": "document.startViewTransition() — the browser captures before/after and animates automatically.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/view-transitions-api/", "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, View Transitions API"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -74,8 +88,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){::view-transition-old(page-content),::view-transition-new(page-content){animation:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../shared-element-transition/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/view-transitions-api/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>View Transitions API</h1><p>document.startViewTransition() — the browser captures before/after and animates automatically.</p>@@ -174,5 +202,6 @@document.querySelectorAll('.page').forEach((el,i)=>{el.classList.toggle('active',i===0);el.style.cssText='';el.style.background=PAGES[i].bg;el.style.opacity=i===0?'1':'0'});animating=false;});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/03-page-transitions/zoom-transition/index.html b/animations/03-page-transitions/zoom-transition/index.htmlindex 5e6e1df4..2f63ed49 100644--- a/animations/03-page-transitions/zoom-transition/index.html+++ b/animations/03-page-transitions/zoom-transition/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Zoom Transition</title>+ <title>Zoom Transition — Animation Handbook</title>+ <meta name="description" content="Three scale variants — zoom in, zoom out, and pull-through — each implying different spatial depth.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/zoom-transition/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Zoom Transition — Animation Handbook">+ <meta property="og:description" content="Three scale variants — zoom in, zoom out, and pull-through — each implying different spatial depth.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/zoom-transition/">+ <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="Zoom Transition — Animation Handbook">+ <meta name="twitter:description" content="Three scale variants — zoom in, zoom out, and pull-through — each implying different spatial depth.">+ <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": "Zoom Transition", "name": "Zoom Transition", "description": "Three scale variants — zoom in, zoom out, and pull-through — each implying different spatial depth.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/zoom-transition/", "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, Zoom Transition"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -52,8 +66,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){.page{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../slide-transition/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../flash-transition/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/03-page-transitions/zoom-transition/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Zoom Transition</h1><p>Three scale variants — zoom in, zoom out, and pull-through — each implying different spatial depth.</p>@@ -165,5 +193,6 @@document.querySelectorAll('.page').forEach((el,i)=>{el.classList.toggle('active',i===0);el.style.cssText='';el.style.background=PAGES[i].bg;el.style.opacity=i===0?'1':'0'});animating=false;});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/README.md b/animations/04-micro-interactions/README.mdindex 90b5fd9d..73ef0f7c 100644--- a/animations/04-micro-interactions/README.md+++ b/animations/04-micro-interactions/README.md@@ -28,6 +28,13 @@ Short, user-triggered animations that provide feedback, confirm actions, and com| [Cursor Follower](cursor-follower/) | Lerp-lagged cursor + mix-blend-mode: difference inversion || [Error Shake](error-shake/) | Invalid field shakes with a decaying wobble and flashes red — the universal "no" || [Swipe to Dismiss](swipe-to-dismiss/) | Drag past a threshold to fling a card away as its row collapses — pointer-driven, touch-ready |+| [Hamburger Menu Toggle](hamburger-menu-toggle/) | The bars icon morphs to an X — top and bottom bars rotate to cross while the middle fades |+| [Theme Toggle Morph](theme-toggle-morph/) | A sun morphs into a crescent moon as the interface flips between light and dark |+| [Copy to Clipboard](copy-to-clipboard/) | Copy button swaps to a checkmark and a Copied confirmation, then reverts |+| [Star Rating](star-rating/) | Stars fill toward the pointer and pop on commit — an accessible five-star control |+| [Toast Notification](toast-notification/) | Notification cards slide in, stack, and auto-dismiss with a progress bar |+| [Segmented Control](segmented-control/) | A highlighted pill slides under the selected segment — iOS-style |+| [Pull to Refresh](pull-to-refresh/) | Drag past the top to reveal a spinner; release past a threshold to refresh |## Key conceptsdiff --git a/animations/04-micro-interactions/accordion/index.html b/animations/04-micro-interactions/accordion/index.htmlindex c45332aa..258c51da 100644--- a/animations/04-micro-interactions/accordion/index.html+++ b/animations/04-micro-interactions/accordion/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Accordion Open/Close</title>+ <title>Accordion Open/Close — Animation Handbook</title>+ <meta name="description" content="Height animates between 0 and auto — two approaches: JS measured height and CSS grid-template-rows.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/accordion/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Accordion Open/Close — Animation Handbook">+ <meta property="og:description" content="Height animates between 0 and auto — two approaches: JS measured height and CSS grid-template-rows.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/accordion/">+ <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="Accordion Open/Close — Animation Handbook">+ <meta name="twitter:description" content="Height animates between 0 and auto — two approaches: JS measured height and CSS grid-template-rows.">+ <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": "Accordion Open/Close", "name": "Accordion Open/Close", "description": "Height animates between 0 and auto — two approaches: JS measured height and CSS grid-template-rows.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/accordion/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Accordion Open/Close"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -53,8 +67,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:500px}}@media(prefers-reduced-motion:reduce){.acc-body,.acc-chevron,.acc-body.stagger .acc-inner>*{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../modal-expand/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../cursor-follower/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/accordion/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Accordion Open/Close</h1><p>Height animates between 0 and auto — two approaches: JS measured height and CSS grid-template-rows.</p>@@ -189,5 +217,6 @@});});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/badge-pulse/index.html b/animations/04-micro-interactions/badge-pulse/index.htmlindex 8cbd73c1..ba7fbab3 100644--- a/animations/04-micro-interactions/badge-pulse/index.html+++ b/animations/04-micro-interactions/badge-pulse/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Notification Badge Pulse</title>+ <title>Notification Badge Pulse — Animation Handbook</title>+ <meta name="description" content="Dot on icon pulses to draw peripheral attention — scale, halo, or both.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/badge-pulse/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Notification Badge Pulse — Animation Handbook">+ <meta property="og:description" content="Dot on icon pulses to draw peripheral attention — scale, halo, or both.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/badge-pulse/">+ <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="Notification Badge Pulse — Animation Handbook">+ <meta name="twitter:description" content="Dot on icon pulses to draw peripheral attention — scale, halo, or both.">+ <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": "Notification Badge Pulse", "name": "Notification Badge Pulse", "description": "Dot on icon pulses to draw peripheral attention — scale, halo, or both.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/badge-pulse/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Notification Badge Pulse"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -55,8 +69,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:360px}.icon-row{gap:20px}}@media(prefers-reduced-motion:reduce){.badge,.dot-badge,.status-dot,.badge::after,.dot-badge::after{animation:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../form-field-morph/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../tooltip-reveal/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/badge-pulse/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Notification Badge Pulse</h1><p>Dot on icon pulses to draw peripheral attention — scale, halo, or both.</p>@@ -145,5 +173,6 @@icons.forEach(ic=>ic.classList.toggle('fade-mode',e.target.checked));});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/button-press-scale/index.html b/animations/04-micro-interactions/button-press-scale/index.htmlindex 30abef6b..eba4b59f 100644--- a/animations/04-micro-interactions/button-press-scale/index.html+++ b/animations/04-micro-interactions/button-press-scale/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Button Press Scale</title>+ <title>Button Press Scale — Animation Handbook</title>+ <meta name="description" content="Scales to 0.95 on press, springs back on release — asymmetric timing gives a tactile feel.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/button-press-scale/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Button Press Scale — Animation Handbook">+ <meta property="og:description" content="Scales to 0.95 on press, springs back on release — asymmetric timing gives a tactile feel.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/button-press-scale/">+ <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="Button Press Scale — Animation Handbook">+ <meta name="twitter:description" content="Scales to 0.95 on press, springs back on release — asymmetric timing gives a tactile feel.">+ <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": "Button Press Scale", "name": "Button Press Scale", "description": "Scales to 0.95 on press, springs back on release — asymmetric timing gives a tactile feel.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/button-press-scale/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Button Press Scale"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -40,8 +54,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:360px}}@media(prefers-reduced-motion:reduce){.pbtn,.pbtn.pressed{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../focus-ring/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../magnetic-button/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/button-press-scale/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Button Press Scale</h1><p>Scales to 0.95 on press, springs back on release — asymmetric timing gives a tactile feel.</p>@@ -113,5 +141,6 @@document.documentElement.style.setProperty('--release-ease',e.target.value);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/checkmark-draw/index.html b/animations/04-micro-interactions/checkmark-draw/index.htmlindex 818ff1ac..10c10c7d 100644--- a/animations/04-micro-interactions/checkmark-draw/index.html+++ b/animations/04-micro-interactions/checkmark-draw/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Checkmark Draw</title>+ <title>Checkmark Draw — Animation Handbook</title>+ <meta name="description" content="SVG path draws progressively on success — stroke-dashoffset animates from full length to zero.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/checkmark-draw/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Checkmark Draw — Animation Handbook">+ <meta property="og:description" content="SVG path draws progressively on success — stroke-dashoffset animates from full length to zero.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/checkmark-draw/">+ <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="Checkmark Draw — Animation Handbook">+ <meta name="twitter:description" content="SVG path draws progressively on success — stroke-dashoffset animates from full length to zero.">+ <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": "Checkmark Draw", "name": "Checkmark Draw", "description": "SVG path draws progressively on success — stroke-dashoffset animates from full length to zero.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/checkmark-draw/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Checkmark Draw"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -58,8 +72,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:440px}}@media(prefers-reduced-motion:reduce){.check-circle,.check-mark,.x-mark,.x-mark2{transition:none!important}.icon-wrap.drawn .check-circle,.icon-wrap.drawn .check-mark,.icon-wrap.error .x-mark,.icon-wrap.error .x-mark2{stroke-dashoffset:0}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../progress-animation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../form-field-morph/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/checkmark-draw/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Checkmark Draw</h1><p>SVG path draws progressively on success — stroke-dashoffset animates from full length to zero.</p>@@ -158,5 +186,6 @@// Auto-replay every 4sautoTimer=setInterval(()=>{if(!running){reset();setTimeout(runSequence,300);}},4000);</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/click-ripple/index.html b/animations/04-micro-interactions/click-ripple/index.htmlindex 9f4bfb4b..04cdf5ff 100644--- a/animations/04-micro-interactions/click-ripple/index.html+++ b/animations/04-micro-interactions/click-ripple/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Click / Tap Ripple</title>+ <title>Click / Tap Ripple — Animation Handbook</title>+ <meta name="description" content="Ripple emanates from the exact click point — Material Design's tactile confirmation pattern.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/click-ripple/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Click / Tap Ripple — Animation Handbook">+ <meta property="og:description" content="Ripple emanates from the exact click point — Material Design's tactile confirmation pattern.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/click-ripple/">+ <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="Click / Tap Ripple — Animation Handbook">+ <meta name="twitter:description" content="Ripple emanates from the exact click point — Material Design's tactile confirmation pattern.">+ <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": "Click / Tap Ripple", "name": "Click / Tap Ripple", "description": "Ripple emanates from the exact click point — Material Design's tactile confirmation pattern.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/click-ripple/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Click / Tap Ripple"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -42,8 +56,22 @@/* Reduced motion: collapse the ripple to near-instant (keep animationend cleanup firing) */@media(prefers-reduced-motion:reduce){.ripple{animation-duration:1ms!important}.rbtn{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../hover-state/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../focus-ring/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/click-ripple/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Click / Tap Ripple</h1><p>Ripple emanates from the exact click point — Material Design's tactile confirmation pattern.</p>@@ -112,5 +140,6 @@document.getElementById('color-sel').addEventListener('change',e=>{color=e.target.value});document.getElementById('center-tog').addEventListener('change',e=>{fromCenter=e.target.checked});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/copy-to-clipboard/README.md b/animations/04-micro-interactions/copy-to-clipboard/README.mdnew file mode 100644index 00000000..74447017--- /dev/null+++ b/animations/04-micro-interactions/copy-to-clipboard/README.md@@ -0,0 +1,56 @@+# Copy to Clipboard++## What it is+Copy-to-clipboard feedback is the transient confirmation a button gives after copying text. The moment the copy succeeds, the icon morphs from a clipboard glyph to a checkmark, the label crossfades from "Copy" to "Copied!", and a brief color pulse acknowledges the event. After about 1.5 seconds the button reverts to its resting state, ready to use again. It is the canonical example of transient success feedback: confirm, then get out of the way.++## When to use it+- Code blocks and API keys in documentation+- Sharing links, invite codes, or coupon codes+- Copying a value from a table cell or field+- Any single-tap action where the result is invisible and the user needs reassurance it happened++## How it works+Two things run in parallel: the actual copy, and the visual state swap. The copy uses the asynchronous Clipboard API, which returns a promise. Only when it resolves do you flip a single `copied` class on the button — the CSS drives the icon morph, label crossfade, and pulse off that one class. A timer removes the class to revert.++```js+btn.addEventListener('click', () => {+ navigator.clipboard.writeText(snippet.innerText).then(() => {+ btn.classList.add('copied'); // icon + label + pulse+ live.textContent = 'Copied to clipboard'; // aria-live announcement+ setTimeout(() => {+ btn.classList.remove('copied');+ live.textContent = '';+ }, 1500); // revert delay+ });+});+```++```css+.l-copied { opacity: 0; transform: translateY(4px); }+.copied .l-copy { opacity: 0; transform: translateY(-4px); }+.copied .l-copied { opacity: 1; transform: translateY(0); }+.copied .clip { opacity: 0; transform: scale(.5); } /* clipboard out */+.copied .chk { opacity: 1; transform: scale(1); } /* checkmark in */+```++The two labels are stacked in the same grid cell so they crossfade in place without shifting layout, and the two icons are absolutely positioned on top of each other so the clipboard scales out as the checkmark scales in. Only `opacity` and `transform` animate; the checkmark path adds a short `stroke-dashoffset` draw for a hand-drawn finish.++## Key parameters+| Parameter | Default | Effect |+|-----------|---------|--------|+| Revert delay | 1500ms | How long "Copied!" stays before reverting. Under ~1s feels rushed; over ~3s lingers |+| Animation duration | 280ms | Speed of the icon morph and label crossfade. 150–300ms reads as snappy |+| Easing | overshoot | A slight spring overshoot on the checkmark gives the confirmation a bit of pop |+| Pulse | ~520ms | One-shot color ring; runs once per copy, independent of the revert timer |++## Production notes+- **Clipboard API support and fallback**: `navigator.clipboard.writeText` requires a secure context (HTTPS or `localhost`) and a user gesture. Feature-detect it and fall back to a hidden `<textarea>` plus `document.execCommand('copy')` for older or insecure-context browsers, as the demo does.+- **Do not rely on color alone**: the green tint and pulse are reinforcement, not the message. The icon change and the "Copied!" text carry the meaning so colorblind users still get clear feedback.+- **Announce for screen readers**: sighted users see the label change, but assistive tech needs an `aria-live="polite"` (or `role="status"`) region that receives the "Copied to clipboard" string on success. Clear it on revert so it does not re-announce stale state.+- **Revert timing and rapid clicks**: clear any pending timer before starting a new one, otherwise a second copy can revert early. Keep the button interactive during the confirmation so repeated copies work.+- **Reduced motion**: under `prefers-reduced-motion: reduce`, drop the morph, pulse, and stroke draw — swap the icon and label instantly. The confirmation still lands, just without movement.++## See also+- [Checkmark Draw](../checkmark-draw/) — the stroke-dashoffset technique behind the success tick+- [Button Press Scale](../button-press-scale/) — the press feedback that precedes the copy+- [Success Confetti](../success-confetti/) — a louder success celebration for higher-stakes actionsdiff --git a/animations/04-micro-interactions/copy-to-clipboard/index.html b/animations/04-micro-interactions/copy-to-clipboard/index.htmlnew file mode 100644index 00000000..45401b2b--- /dev/null+++ b/animations/04-micro-interactions/copy-to-clipboard/index.html@@ -0,0 +1,181 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Copy to Clipboard — Animation Handbook</title>+ <meta name="description" content="A copy button morphs to a checkmark and "Copied!" on success, then reverts after a short delay.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/copy-to-clipboard/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Copy to Clipboard — Animation Handbook">+ <meta property="og:description" content="A copy button morphs to a checkmark and "Copied!" on success, then reverts after a short delay.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/copy-to-clipboard/">+ <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="Copy to Clipboard — Animation Handbook">+ <meta name="twitter:description" content="A copy button morphs to a checkmark and "Copied!" on success, then reverts after a short delay.">+ <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": "Copy to Clipboard", "name": "Copy to Clipboard", "description": "A copy button morphs to a checkmark and \"Copied!\" on success, then reverts after a short delay.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/copy-to-clipboard/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Copy to Clipboard"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff9d5c;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--dur:280ms;--ease:cubic-bezier(.34,1.4,.5,1);--revert:1500ms;--ok:#56d364}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(11px,1.8vw,15px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ .stage{border:1px solid var(--ui-border);border-radius:8px;background:var(--bg);padding:clamp(16px,3vw,28px);display:flex;flex-direction:column;gap:16px}+ .code-head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10px;color:var(--ui-muted);text-transform:uppercase;letter-spacing:1px}+ pre{background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:6px;padding:16px;overflow-x:auto;font-family:var(--mono);font-size:clamp(11px,1.5vw,13px);line-height:1.7;color:var(--ui-text)}+ pre .k{color:var(--ui-accent)}+ /* copy button */+ .copy-btn{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;align-self:flex-start;background:var(--ui-bg);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:8px;font-family:var(--mono);font-size:12px;font-weight:500;cursor:pointer;overflow:hidden;transition:border-color var(--dur) var(--ease),color var(--dur) var(--ease)}+ .copy-btn.copied{border-color:var(--ok);color:var(--ok)}+ /* pulse ring */+ .copy-btn::after{content:"";position:absolute;inset:0;border-radius:8px;background:var(--ok);opacity:0;transform:scale(.6);pointer-events:none}+ .copy-btn.copied::after{animation:pulse 520ms var(--ease)}+ @keyframes pulse{0%{opacity:.28;transform:scale(.6)}100%{opacity:0;transform:scale(1.08)}}+ /* icon stack: two icons crossfade in place */+ .ic{position:relative;width:16px;height:16px;flex-shrink:0}+ .ic svg{position:absolute;inset:0;width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:opacity var(--dur) var(--ease),transform var(--dur) var(--ease)}+ .ic .clip{opacity:1;transform:scale(1)}+ .ic .chk{opacity:0;transform:scale(.5)}+ .ic .chk path{stroke-dasharray:24;stroke-dashoffset:24;transition:stroke-dashoffset var(--dur) var(--ease)}+ .copy-btn.copied .clip{opacity:0;transform:scale(.5)}+ .copy-btn.copied .chk{opacity:1;transform:scale(1)}+ .copy-btn.copied .chk path{stroke-dashoffset:0;transition-delay:80ms}+ /* label crossfade */+ .lbls{position:relative;display:inline-grid}+ .lbls span{grid-area:1/1;transition:opacity var(--dur) var(--ease),transform var(--dur) var(--ease)}+ .l-copied{opacity:0;transform:translateY(4px)}+ .copy-btn.copied .l-copy{opacity:0;transform:translateY(-4px)}+ .copy-btn.copied .l-copied{opacity:1;transform:translateY(0)}+ .hint{font-size:10px;color:var(--ui-muted)}+ .sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}+ /* panel */+ aside{width:clamp(200px,22vw,240px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+ .div{height:1px;background:var(--ui-border)}+ .sr{display:flex;align-items:center;gap:6px;font-size:10px}+ .sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+ .sv{width:52px;text-align:right;color:var(--ui-text)}+ select{background:var(--ui-bg);border:1px solid var(--ui-border);color:var(--ui-text);font-family:var(--mono);font-size:10px;padding:8px 6px;border-radius:4px;width:100%;min-height:44px}+ @media(max-width:600px){.layout{flex-direction:column}aside{width:100%}}+ @media(prefers-reduced-motion:reduce){.copy-btn,.copy-btn::after,.ic svg,.ic .chk path,.lbls span{transition:none!important;animation:none!important}}+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../theme-toggle-morph/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../star-rating/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/copy-to-clipboard/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Copy to Clipboard</h1>+ <p>A copy button morphs to a checkmark and "Copied!" on success, then reverts after a short delay.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage">+ <div class="code-head"><span>snippet.js</span><span>click copy to grab it</span></div>+ <pre id="snippet"><span class="k">const</span> el = document.querySelector(<span class="k">'.card'</span>);+el.animate(+ [{ opacity: <span class="k">0</span> }, { opacity: <span class="k">1</span> }],+ { duration: <span class="k">300</span>, easing: <span class="k">'ease-out'</span> }+);</pre>+ <button class="copy-btn" id="copyBtn" type="button" aria-label="Copy code snippet">+ <span class="ic" aria-hidden="true">+ <svg class="clip" viewBox="0 0 16 16"><rect x="5" y="5" width="9" height="9" rx="1.5"/><path d="M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5"/></svg>+ <svg class="chk" viewBox="0 0 16 16"><path d="M3.5 8.5l3 3 6-6.5"/></svg>+ </span>+ <span class="lbls"><span class="l-copy">Copy</span><span class="l-copied">Copied!</span></span>+ </button>+ <span class="sr-only" id="live" role="status" aria-live="polite"></span>+ <span class="hint">Uses navigator.clipboard.writeText with a document.execCommand fallback.</span>+ </div>+ </div>+ <aside>+ <p class="note">Success feedback should be transient: confirm the action, then quietly revert so the control is ready to use again.</p>+ <div class="lbl">Revert delay</div>+ <div class="sr"><input type="range" id="rv" min="600" max="3000" value="1500" step="100"><span class="sv" id="rvv">1500ms</span></div>+ <div class="lbl">Animation duration</div>+ <div class="sr"><input type="range" id="du" min="120" max="600" value="280" step="20"><span class="sv" id="duv">280ms</span></div>+ <div class="lbl">Easing</div>+ <select id="es">+ <option value="cubic-bezier(.34,1.4,.5,1)" selected>Overshoot (spring)</option>+ <option value="ease-out">Ease out</option>+ <option value="ease-in-out">Ease in-out</option>+ <option value="linear">Linear</option>+ </select>+ <div class="div"></div>+ <p class="note" style="border-color:var(--ui-border)">The checkmark and label share one <code>.copied</code> class toggle; a timer removes it to revert.</p>+ </aside>+</div>+<script>+ const btn=document.getElementById('copyBtn');+ const snippet=document.getElementById('snippet');+ const live=document.getElementById('live');+ const root=document.documentElement;+ let timer=null;+ let revert=1500;++ function copyText(text){+ if(navigator.clipboard&&navigator.clipboard.writeText){+ return navigator.clipboard.writeText(text);+ }+ return new Promise((res,rej)=>{+ const ta=document.createElement('textarea');+ ta.value=text;ta.style.position='fixed';ta.style.opacity='0';+ document.body.appendChild(ta);ta.select();+ try{document.execCommand('copy')?res():rej();}catch(e){rej(e);}+ document.body.removeChild(ta);+ });+ }++ btn.addEventListener('click',()=>{+ const text=snippet.innerText;+ copyText(text).then(()=>{+ btn.classList.add('copied');+ live.textContent='Copied to clipboard';+ clearTimeout(timer);+ timer=setTimeout(()=>{+ btn.classList.remove('copied');+ live.textContent='';+ },revert);+ }).catch(()=>{+ live.textContent='Copy failed — select and copy manually';+ });+ });++ document.getElementById('rv').addEventListener('input',e=>{+ revert=+e.target.value;+ document.getElementById('rvv').textContent=e.target.value+'ms';+ });+ document.getElementById('du').addEventListener('input',e=>{+ document.getElementById('duv').textContent=e.target.value+'ms';+ root.style.setProperty('--dur',e.target.value+'ms');+ });+ document.getElementById('es').addEventListener('change',e=>{+ root.style.setProperty('--ease',e.target.value);+ });+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/04-micro-interactions/cursor-follower/index.html b/animations/04-micro-interactions/cursor-follower/index.htmlindex 1fdc173c..a58a1564 100644--- a/animations/04-micro-interactions/cursor-follower/index.html+++ b/animations/04-micro-interactions/cursor-follower/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Cursor Follower</title>+ <title>Cursor Follower — Animation Handbook</title>+ <meta name="description" content="Custom element follows mouse with lerp lag — mix-blend-mode: difference inverts any background.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/cursor-follower/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Cursor Follower — Animation Handbook">+ <meta property="og:description" content="Custom element follows mouse with lerp lag — mix-blend-mode: difference inverts any background.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/cursor-follower/">+ <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="Cursor Follower — Animation Handbook">+ <meta name="twitter:description" content="Custom element follows mouse with lerp lag — mix-blend-mode: difference inverts any background.">+ <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": "Cursor Follower", "name": "Cursor Follower", "description": "Custom element follows mouse with lerp lag — mix-blend-mode: difference inverts any background.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/cursor-follower/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Cursor Follower"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -48,8 +62,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:400px}}@media(prefers-reduced-motion:reduce){#follower{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../accordion/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../error-shake/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/cursor-follower/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Cursor Follower</h1><p>Custom element follows mouse with lerp lag — mix-blend-mode: difference inverts any background.</p>@@ -132,5 +160,6 @@});document.getElementById('expand-tog').addEventListener('change',e=>{expandOnHover=e.target.checked});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/drawer-slide/index.html b/animations/04-micro-interactions/drawer-slide/index.htmlindex a84a7fe0..19ad9473 100644--- a/animations/04-micro-interactions/drawer-slide/index.html+++ b/animations/04-micro-interactions/drawer-slide/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Drawer / Panel Slide</title>+ <title>Drawer / Panel Slide — Animation Handbook</title>+ <meta name="description" content="Off-canvas panel slides from edge — ease-out open, ease-in close. Swipe or backdrop to dismiss.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/drawer-slide/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Drawer / Panel Slide — Animation Handbook">+ <meta property="og:description" content="Off-canvas panel slides from edge — ease-out open, ease-in close. Swipe or backdrop to dismiss.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/drawer-slide/">+ <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="Drawer / Panel Slide — Animation Handbook">+ <meta name="twitter:description" content="Off-canvas panel slides from edge — ease-out open, ease-in close. Swipe or backdrop to dismiss.">+ <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": "Drawer / Panel Slide", "name": "Drawer / Panel Slide", "description": "Off-canvas panel slides from edge — ease-out open, ease-in close. Swipe or backdrop to dismiss.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/drawer-slide/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Drawer / Panel Slide"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -61,8 +75,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){.drawer,.backdrop{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../tooltip-reveal/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../modal-expand/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/drawer-slide/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Drawer / Panel Slide</h1><p>Off-canvas panel slides from edge — ease-out open, ease-in close. Swipe or backdrop to dismiss.</p>@@ -164,5 +192,6 @@document.documentElement.style.setProperty('--backdrop-op',v);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/error-shake/index.html b/animations/04-micro-interactions/error-shake/index.htmlindex 0caf33fe..0221f8c8 100644--- a/animations/04-micro-interactions/error-shake/index.html+++ b/animations/04-micro-interactions/error-shake/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Error Shake</title>+ <title>Error Shake — Animation Handbook</title>+ <meta name="description" content="Invalid input triggers a decaying horizontal wobble plus a red border — a universal "no".">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/error-shake/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Error Shake — Animation Handbook">+ <meta property="og:description" content="Invalid input triggers a decaying horizontal wobble plus a red border — a universal "no".">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/error-shake/">+ <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="Error Shake — Animation Handbook">+ <meta name="twitter:description" content="Invalid input triggers a decaying horizontal wobble plus a red border — a universal "no".">+ <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": "Error Shake", "name": "Error Shake", "description": "Invalid input triggers a decaying horizontal wobble plus a red border — a universal \"no\".", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/error-shake/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Error Shake"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -55,8 +69,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px}}@media(prefers-reduced-motion:reduce){.field.error input{animation:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../cursor-follower/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../swipe-to-dismiss/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/error-shake/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Error Shake</h1><p>Invalid input triggers a decaying horizontal wobble plus a red border — a universal "no".</p>@@ -150,5 +178,6 @@buildShake(6);</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/focus-ring/index.html b/animations/04-micro-interactions/focus-ring/index.htmlindex 417d97c5..7bc930ac 100644--- a/animations/04-micro-interactions/focus-ring/index.html+++ b/animations/04-micro-interactions/focus-ring/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Focus Ring Animation</title>+ <title>Focus Ring Animation — Animation Handbook</title>+ <meta name="description" content="Animated outline on keyboard Tab — :focus-visible ensures mouse users see no ring.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/focus-ring/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Focus Ring Animation — Animation Handbook">+ <meta property="og:description" content="Animated outline on keyboard Tab — :focus-visible ensures mouse users see no ring.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/focus-ring/">+ <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="Focus Ring Animation — Animation Handbook">+ <meta name="twitter:description" content="Animated outline on keyboard Tab — :focus-visible ensures mouse users see no ring.">+ <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": "Focus Ring Animation", "name": "Focus Ring Animation", "description": "Animated outline on keyboard Tab — :focus-visible ensures mouse users see no ring.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/focus-ring/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Focus Ring Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -53,8 +67,22 @@/* Reduced motion: keep the focus outline (a11y) but drop the ring-in expansion */@media(prefers-reduced-motion:reduce){.focusable,.tab-step,.form-btn,.form-link,.focusable:focus-visible,.form-btn:focus-visible,.form-link:focus-visible{animation:none!important;transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../click-ripple/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../button-press-scale/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/focus-ring/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Focus Ring Animation</h1><p>Animated outline on keyboard Tab — :focus-visible ensures mouse users see no ring.</p>@@ -138,5 +166,6 @@tabs.forEach(t=>t.classList.remove('active'));});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/form-field-morph/index.html b/animations/04-micro-interactions/form-field-morph/index.htmlindex dd75ff78..7f091b32 100644--- a/animations/04-micro-interactions/form-field-morph/index.html+++ b/animations/04-micro-interactions/form-field-morph/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Form Field Morph</title>+ <title>Form Field Morph — Animation Handbook</title>+ <meta name="description" content="Floating label rises out of the input on focus — persists when the field is filled.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/form-field-morph/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Form Field Morph — Animation Handbook">+ <meta property="og:description" content="Floating label rises out of the input on focus — persists when the field is filled.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/form-field-morph/">+ <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="Form Field Morph — Animation Handbook">+ <meta name="twitter:description" content="Floating label rises out of the input on focus — persists when the field is filled.">+ <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": "Form Field Morph", "name": "Form Field Morph", "description": "Floating label rises out of the input on focus — persists when the field is filled.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/form-field-morph/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Form Field Morph"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -47,8 +61,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:460px}}@media(prefers-reduced-motion:reduce){.float-field label,.float-field input,.float-field .underline,.box-field label,.box-field input{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../checkmark-draw/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../badge-pulse/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/form-field-morph/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Form Field Morph</h1><p>Floating label rises out of the input on focus — persists when the field is filled.</p>@@ -139,5 +167,6 @@document.documentElement.style.setProperty('--focus-color',e.target.value);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/hamburger-menu-toggle/README.md b/animations/04-micro-interactions/hamburger-menu-toggle/README.mdnew file mode 100644index 00000000..81b2e130--- /dev/null+++ b/animations/04-micro-interactions/hamburger-menu-toggle/README.md@@ -0,0 +1,57 @@+# Hamburger Menu Toggle++## What it is+A three-line "hamburger" icon that morphs into an ✕ when activated. The same+three bars serve both states: the top and bottom bars rotate toward the center+to form the cross, and the middle bar fades out. It signals that a hidden menu+has opened without swapping to a different icon.++## When to use it+- Compact top bars where a full navigation list will not fit, most often on mobile or narrow tablet layouts.+- Any panel, drawer, or off-canvas menu whose open/closed state you want the trigger itself to reflect.+- Cases where you want a single control to communicate "tap to open" and "tap to close" without a second button.++## How it works+The bars are three absolutely positioned spans stacked inside a fixed-height+box. Toggling `aria-expanded` on the button flips the styling: the outer bars+translate to the vertical center and rotate ±45°, and the middle bar drops its+opacity. Because only `transform` and `opacity` change, the morph stays on the+compositor.++```css+.bar{transition:transform var(--dur) var(--ease),opacity calc(var(--dur)*.6) var(--ease)}+.burger[aria-expanded="true"] .bar.top{transform:translateY(16px) rotate(45deg)}+.burger[aria-expanded="true"] .bar.mid{opacity:0;transform:scaleX(.2)}+.burger[aria-expanded="true"] .bar.bot{transform:translateY(-16px) rotate(-45deg)}+```++The `translateY` value must equal the distance from each outer bar to the box+center so the two lines meet exactly; `transform-origin:center` keeps the+rotation pivot on that meeting point.++## Key parameters++| Parameter | Default | Effect |+|-----------|---------|--------|+| `--dur` | `340ms` | Length of the morph. Below ~200ms it snaps; above ~500ms it drags. |+| `--ease` | `cubic-bezier(.65,0,.35,1)` | Timing curve. A back/overshoot curve adds a small spring on the cross. |+| `--bar-w` | `44px` | Bar length; also the visual width of the icon. |+| `--bar-h` | `4px` | Bar thickness. Thicker bars read better at small sizes. |+| `translateY` | `16px` | Vertical travel that brings the outer bars together — tie it to the box height. |++## Production notes+Toggle `aria-expanded` on a real `<button>` (not a `<div>`) and update+`aria-label` between "Open menu" and "Close menu" so assistive tech announces+the current state; wire the button to the panel with `aria-controls`. Mark the+bars `aria-hidden="true"` since they are decorative. Honor+`prefers-reduced-motion` by cutting the transitions to an instant swap. If the+`translateY` offset is hardcoded, changing the icon size or bar thickness will+misalign the cross — derive it from the box height. Framer Motion expresses the+same thing with `animate` variants per bar; a CSS-only version can drive the+morph from a hidden checkbox (`:checked ~`) instead of JavaScript, at the cost+of the ARIA state.++## See also+- [Toggle / Switch Slide](../toggle-switch/)+- [Drawer Slide](../drawer-slide/)+- [Modal Expand](../modal-expand/)diff --git a/animations/04-micro-interactions/hamburger-menu-toggle/index.html b/animations/04-micro-interactions/hamburger-menu-toggle/index.htmlnew file mode 100644index 00000000..79f8e250--- /dev/null+++ b/animations/04-micro-interactions/hamburger-menu-toggle/index.html@@ -0,0 +1,151 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Hamburger Menu Toggle — Animation Handbook</title>+ <meta name="description" content="Three bars morph into an ✕ — top and bottom rotate to cross while the middle fades out.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/hamburger-menu-toggle/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Hamburger Menu Toggle — Animation Handbook">+ <meta property="og:description" content="Three bars morph into an ✕ — top and bottom rotate to cross while the middle fades out.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/hamburger-menu-toggle/">+ <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="Hamburger Menu Toggle — Animation Handbook">+ <meta name="twitter:description" content="Three bars morph into an ✕ — top and bottom rotate to cross while the middle fades out.">+ <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": "Hamburger Menu Toggle", "name": "Hamburger Menu Toggle", "description": "Three bars morph into an ✕ — top and bottom rotate to cross while the middle fades out.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/hamburger-menu-toggle/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Hamburger Menu Toggle"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff9d5c;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--stage-h:620px;--dur:340ms;--ease:cubic-bezier(.65,0,.35,1);--bar-h:4px;--bar-w:44px}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(11px,1.8vw,15px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ .stage{height:var(--stage-h);border:1px solid var(--ui-border);border-radius:8px;background:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;padding:32px}+ /* The button */+ .burger{position:relative;width:76px;height:76px;flex-shrink:0;display:grid;place-items:center;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:14px;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:border-color var(--dur) var(--ease)}+ .burger:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}+ .bars{position:relative;width:var(--bar-w);height:36px}+ .bar{position:absolute;left:0;width:100%;height:var(--bar-h);border-radius:2px;background:var(--ui-accent);transition:transform var(--dur) var(--ease),opacity calc(var(--dur)*.6) var(--ease)}+ .bar.top{top:0;transform-origin:center}+ .bar.mid{top:50%;margin-top:calc(var(--bar-h)/-2)}+ .bar.bot{bottom:0;transform-origin:center}+ /* Open state: top+bottom rotate to cross, middle fades */+ .burger[aria-expanded="true"] .bar.top{transform:translateY(16px) rotate(45deg)}+ .burger[aria-expanded="true"] .bar.mid{opacity:0;transform:scaleX(.2)}+ .burger[aria-expanded="true"] .bar.bot{transform:translateY(-16px) rotate(-45deg)}+ .burger[aria-expanded="true"]{border-color:var(--ui-accent)}+ /* Slide-down menu */+ .menu{width:100%;max-width:280px;overflow:hidden;max-height:0;opacity:0;transition:max-height var(--dur) var(--ease),opacity var(--dur) var(--ease)}+ .menu.show{max-height:240px;opacity:1}+ .menu ul{list-style:none;display:flex;flex-direction:column;gap:6px}+ .menu li{background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:6px;padding:12px 14px;font-size:12px;transform:translateY(-8px);opacity:0;transition:transform var(--dur) var(--ease),opacity var(--dur) var(--ease)}+ .menu.show li{transform:translateY(0);opacity:1}+ .menu.show li:nth-child(1){transition-delay:60ms}+ .menu.show li:nth-child(2){transition-delay:110ms}+ .menu.show li:nth-child(3){transition-delay:160ms}+ .menu.show li:nth-child(4){transition-delay:210ms}+ .state{font-size:10px;color:var(--ui-muted)}+ .state b{color:var(--ui-accent);font-weight:500}+ /* Controls */+ aside{width:clamp(200px,22vw,240px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+ .div{height:1px;background:var(--ui-border)}+ .sr{display:flex;align-items:center;gap:6px;font-size:10px}+ .sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+ .sval{width:52px;text-align:right;color:var(--ui-text)}+ select{background:var(--ui-bg);border:1px solid var(--ui-border);color:var(--ui-text);font-family:monospace;font-size:10px;padding:8px 6px;border-radius:4px;width:100%;min-height:44px}+ @media(hover:hover){.burger:hover{border-color:var(--ui-accent)}}+ @media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:400px}}+ @media(prefers-reduced-motion:reduce){.bar,.menu,.menu li,.burger{transition:none!important}.menu li{transition-delay:0ms!important}}+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../swipe-to-dismiss/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../theme-toggle-morph/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/hamburger-menu-toggle/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Hamburger Menu Toggle</h1>+ <p>Three bars morph into an ✕ — top and bottom rotate to cross while the middle fades out.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage">+ <button type="button" class="burger" id="burger" aria-label="Open menu" aria-expanded="false" aria-controls="menu">+ <span class="bars" aria-hidden="true">+ <span class="bar top"></span>+ <span class="bar mid"></span>+ <span class="bar bot"></span>+ </span>+ </button>+ <nav class="menu" id="menu" aria-label="Demo menu">+ <ul>+ <li>Home</li>+ <li>Work</li>+ <li>About</li>+ <li>Contact</li>+ </ul>+ </nav>+ <div class="state">State: <b id="state">closed</b></div>+ </div>+ </div>+ <aside>+ <p class="note">The icon and the ✕ are the same three bars. Nothing is added or removed — only <b style="color:var(--ui-accent)">transform</b> and <b style="color:var(--ui-accent)">opacity</b> change, so it stays on the GPU.</p>+ <div class="lbl">Duration</div>+ <div class="sr"><input type="range" id="dur-sl" min="120" max="700" value="340" step="20"><span class="sval" id="dur-v">340ms</span></div>+ <div class="lbl">Bar thickness</div>+ <div class="sr"><input type="range" id="th-sl" min="2" max="7" value="4" step="1"><span class="sval" id="th-v">4px</span></div>+ <div class="lbl">Easing</div>+ <select id="ease-sel">+ <option value="cubic-bezier(.65,0,.35,1)" selected>Smooth (in-out)</option>+ <option value="cubic-bezier(.34,1.56,.64,1)">Back / overshoot</option>+ <option value="ease-out">Ease out</option>+ <option value="linear">Linear</option>+ </select>+ <div class="div"></div>+ <p style="font-size:10px;color:var(--ui-muted)">Tap the button to toggle. It works with keyboard too — Tab to it, press Enter.</p>+ </aside>+</div>+<script>+ const btn=document.getElementById('burger');+ const menu=document.getElementById('menu');+ const state=document.getElementById('state');+ btn.addEventListener('click',()=>{+ const open=btn.getAttribute('aria-expanded')==='true';+ btn.setAttribute('aria-expanded',String(!open));+ btn.setAttribute('aria-label',open?'Open menu':'Close menu');+ menu.classList.toggle('show',!open);+ state.textContent=open?'closed':'open';+ });+ const root=document.documentElement;+ const durSl=document.getElementById('dur-sl'),durV=document.getElementById('dur-v');+ durSl.addEventListener('input',e=>{durV.textContent=e.target.value+'ms';root.style.setProperty('--dur',e.target.value+'ms');});+ const thSl=document.getElementById('th-sl'),thV=document.getElementById('th-v');+ thSl.addEventListener('input',e=>{thV.textContent=e.target.value+'px';root.style.setProperty('--bar-h',e.target.value+'px');});+ document.getElementById('ease-sel').addEventListener('change',e=>{root.style.setProperty('--ease',e.target.value);});+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/04-micro-interactions/heart-burst/index.html b/animations/04-micro-interactions/heart-burst/index.htmlindex 4a74c708..1c1876bd 100644--- a/animations/04-micro-interactions/heart-burst/index.html+++ b/animations/04-micro-interactions/heart-burst/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Heart / Like Burst</title>+ <title>Heart / Like Burst — Animation Handbook</title>+ <meta name="description" content="Tap to like — the heart pops and fills as a spray of small hearts bursts outward and fades, Twitter-style.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/heart-burst/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Heart / Like Burst — Animation Handbook">+ <meta property="og:description" content="Tap to like — the heart pops and fills as a spray of small hearts bursts outward and fades, Twitter-style.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/heart-burst/">+ <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="Heart / Like Burst — Animation Handbook">+ <meta name="twitter:description" content="Tap to like — the heart pops and fills as a spray of small hearts bursts outward and fades, Twitter-style.">+ <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": "Heart / Like Burst", "name": "Heart / Like Burst", "description": "Tap to like — the heart pops and fills as a spray of small hearts bursts outward and fades, Twitter-style.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/heart-burst/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Heart / Like Burst"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}@@ -38,8 +52,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px}}@media(prefers-reduced-motion:reduce){.like-btn.pop .heart{animation:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../toggle-switch/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../success-confetti/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/heart-burst/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Heart / Like Burst</h1><p>Tap to like — the heart pops and fills as a spray of small hearts bursts outward and fades, Twitter-style.</p>@@ -117,5 +145,6 @@ btn.addEventListener('click',()=>{document.getElementById('cnt-sl').addEventListener('input',e=>{pCount=+e.target.value;document.getElementById('cnt-v').textContent=pCount;});document.getElementById('spr-sl').addEventListener('input',e=>{spread=+e.target.value;document.getElementById('spr-v').textContent=spread+'px';});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/hover-state/index.html b/animations/04-micro-interactions/hover-state/index.htmlindex 5c4cf611..d8ce4b32 100644--- a/animations/04-micro-interactions/hover-state/index.html+++ b/animations/04-micro-interactions/hover-state/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Hover State Animation</title>+ <title>Hover State Animation — Animation Handbook</title>+ <meta name="description" content="Six hover techniques side by side — color, scale, lift, underline, icon nudge, and background sweep.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/hover-state/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Hover State Animation — Animation Handbook">+ <meta property="og:description" content="Six hover techniques side by side — color, scale, lift, underline, icon nudge, and background sweep.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/hover-state/">+ <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="Hover State Animation — Animation Handbook">+ <meta name="twitter:description" content="Six hover techniques side by side — color, scale, lift, underline, icon nudge, and background sweep.">+ <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": "Hover State Animation", "name": "Hover State Animation", "description": "Six hover techniques side by side — color, scale, lift, underline, icon nudge, and background sweep.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/hover-state/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Hover State Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -63,8 +77,22 @@/* Reduced motion: hover states still change, but without the tween */@media(prefers-reduced-motion:reduce){.h-color,.h-scale,.h-lift,.arrow,.h-underline .card-link::after,.h-sweep::before{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../click-ripple/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/hover-state/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Hover State Animation</h1><p>Six hover techniques side by side — color, scale, lift, underline, icon nudge, and background sweep.</p>@@ -120,5 +148,6 @@document.documentElement.style.setProperty('--ease',e.target.value);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/loading-spinner/index.html b/animations/04-micro-interactions/loading-spinner/index.htmlindex 77f48cba..3527f43e 100644--- a/animations/04-micro-interactions/loading-spinner/index.html+++ b/animations/04-micro-interactions/loading-spinner/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Loading Spinner</title>+ <title>Loading Spinner — Animation Handbook</title>+ <meta name="description" content="Six spinner variants from a single CSS color and speed — ring, dots, arc, bounce, pulse, square.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/loading-spinner/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Loading Spinner — Animation Handbook">+ <meta property="og:description" content="Six spinner variants from a single CSS color and speed — ring, dots, arc, bounce, pulse, square.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/loading-spinner/">+ <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="Loading Spinner — Animation Handbook">+ <meta name="twitter:description" content="Six spinner variants from a single CSS color and speed — ring, dots, arc, bounce, pulse, square.">+ <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": "Loading Spinner", "name": "Loading Spinner", "description": "Six spinner variants from a single CSS color and speed — ring, dots, arc, bounce, pulse, square.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/loading-spinner/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Loading Spinner"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -60,8 +74,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px}.grid{grid-template-columns:repeat(2,1fr)}}@media(prefers-reduced-motion:reduce){*{animation-duration:.01ms!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../shimmer-effect/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../progress-animation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/loading-spinner/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Loading Spinner</h1><p>Six spinner variants from a single CSS color and speed — ring, dots, arc, bounce, pulse, square.</p>@@ -128,5 +156,6 @@document.querySelector('.sp-pulse').style.background=e.target.value.replace('#','rgba(')+',0.15)';});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/magnetic-button/index.html b/animations/04-micro-interactions/magnetic-button/index.htmlindex 1cda045e..129ed12e 100644--- a/animations/04-micro-interactions/magnetic-button/index.html+++ b/animations/04-micro-interactions/magnetic-button/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Magnetic Button</title>+ <title>Magnetic Button — Animation Handbook</title>+ <meta name="description" content="A CTA that leans toward the cursor within a radius, its label lagging for parallax, then springs home on exit.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/magnetic-button/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Magnetic Button — Animation Handbook">+ <meta property="og:description" content="A CTA that leans toward the cursor within a radius, its label lagging for parallax, then springs home on exit.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/magnetic-button/">+ <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="Magnetic Button — Animation Handbook">+ <meta name="twitter:description" content="A CTA that leans toward the cursor within a radius, its label lagging for parallax, then springs home on exit.">+ <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": "Magnetic Button", "name": "Magnetic Button", "description": "A CTA that leans toward the cursor within a radius, its label lagging for parallax, then springs home on exit.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/magnetic-button/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Magnetic Button"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}@@ -36,8 +50,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px}}@media(prefers-reduced-motion:reduce){.mag,.mag .lbl{transition:transform .12s linear}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../button-press-scale/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../toggle-switch/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/magnetic-button/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Magnetic Button</h1><p>A CTA that leans toward the cursor within a radius, its label lagging for parallax, then springs home on exit.</p>@@ -111,5 +139,6 @@ document.getElementById('ring-tog').addEventListener('change',e=>{ring.classList.toggle('show',e.target.checked);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/modal-expand/index.html b/animations/04-micro-interactions/modal-expand/index.htmlindex 2acc987f..768f7bf8 100644--- a/animations/04-micro-interactions/modal-expand/index.html+++ b/animations/04-micro-interactions/modal-expand/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Modal Expand</title>+ <title>Modal Expand — Animation Handbook</title>+ <meta name="description" content="Modal scales from the trigger button's position — transform-origin set to where you clicked.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/modal-expand/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Modal Expand — Animation Handbook">+ <meta property="og:description" content="Modal scales from the trigger button's position — transform-origin set to where you clicked.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/modal-expand/">+ <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="Modal Expand — Animation Handbook">+ <meta name="twitter:description" content="Modal scales from the trigger button's position — transform-origin set to where you clicked.">+ <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": "Modal Expand", "name": "Modal Expand", "description": "Modal scales from the trigger button's position — transform-origin set to where you clicked.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/modal-expand/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Modal Expand"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -52,8 +66,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}}@media(prefers-reduced-motion:reduce){.modal,.modal-backdrop{transition:none!important}.modal.open{transform:scale(1)!important;opacity:1!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../drawer-slide/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../accordion/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/modal-expand/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Modal Expand</h1><p>Modal scales from the trigger button's position — transform-origin set to where you clicked.</p>@@ -157,5 +185,6 @@document.documentElement.style.setProperty('--modal-ease',e.target.value);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/progress-animation/index.html b/animations/04-micro-interactions/progress-animation/index.htmlindex cdcbdb57..af4fc73d 100644--- a/animations/04-micro-interactions/progress-animation/index.html+++ b/animations/04-micro-interactions/progress-animation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Progress Animation</title>+ <title>Progress Animation — Animation Handbook</title>+ <meta name="description" content="Linear bar, circular ring, and stepped segments — all driven by a single percentage value.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/progress-animation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Progress Animation — Animation Handbook">+ <meta property="og:description" content="Linear bar, circular ring, and stepped segments — all driven by a single percentage value.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/progress-animation/">+ <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="Progress Animation — Animation Handbook">+ <meta name="twitter:description" content="Linear bar, circular ring, and stepped segments — all driven by a single percentage value.">+ <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": "Progress Animation", "name": "Progress Animation", "description": "Linear bar, circular ring, and stepped segments — all driven by a single percentage value.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/progress-animation/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Progress Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -54,8 +68,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:500px}}@media(prefers-reduced-motion:reduce){.prog-fill,.prog-arc{transition:none!important}.prog-fill.indet{animation:none!important;width:100%!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../loading-spinner/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../checkmark-draw/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/progress-animation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Progress Animation</h1><p>Linear bar, circular ring, and stepped segments — all driven by a single percentage value.</p>@@ -162,5 +190,6 @@if(!e.target.checked)linearFill.classList.remove('indet');});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/pull-to-refresh/README.md b/animations/04-micro-interactions/pull-to-refresh/README.mdnew file mode 100644index 00000000..10763974--- /dev/null+++ b/animations/04-micro-interactions/pull-to-refresh/README.md@@ -0,0 +1,55 @@+# Pull to Refresh++## What it is+Pull to refresh is the touch gesture where dragging a scroll list downward past its top edge reveals a spinner that fills and rotates in proportion to the drag distance. Release past a set threshold and the view enters a "refreshing" state, holds the spinner while new data loads, then snaps the content back and updates the list. It is the standard reload gesture in mail, feed, and message apps.++## When to use it+- Feeds, inboxes, and timelines where "get the latest" is a frequent, expected action+- Touch-first screens where a visible reload button would clutter the header+- Lists whose content changes server-side between visits (notifications, orders, chat)+- Anywhere the content is already scrollable from the top, so the gesture has room to start++## How it works+The list lives in a scroller and is moved with a single `translateY`. On `pointerdown` the start Y is recorded; on `pointermove` the gesture is only *claimed* once the finger has moved down and the scroller is already at the top (`scrollTop <= 0`), which keeps normal scrolling intact everywhere else. The raw drag distance is passed through a rubber-band function so the list tracks the finger closely at first and fights back harder the further it is pulled:++```js+function resist(dy){ // near 1:1 at first, asymptotic as it grows+ const max = threshold * 2.2;+ return max * dy / (dy + max * resistance);+}++scroller.addEventListener('pointermove', e => {+ const dy = e.clientY - startY;+ if (!pulling){+ if (dy > 4 && scroller.scrollTop <= 0){ pulling = true; scroller.setPointerCapture(e.pointerId); }+ else return; // let native scroll run+ }+ pull = resist(dy);+ setY(pull); // translateY on list + indicator+ drawSpin(); // opacity + rotate scale with pull/threshold+});+```++On `pointerup`, if `pull >= threshold` the view enters the refreshing state: the list is tweened to a resting offset that keeps the spinner visible, the spinner switches from drag-driven rotation to a continuous CSS animation, and after the refresh duration a new item is prepended and everything snaps back. A short pull tweens straight back to zero. Only `transform` and `opacity` move — never `top` or `height` — so the whole gesture stays on the compositor.++## Key parameters+| Parameter | Default | Effect |+|-----------|---------|--------|+| Pull threshold | 64px | Resisted distance the list must pass before a release triggers a refresh |+| Resistance | 2.0× | Damping of the rubber band; higher makes the list harder to pull far |+| Spinner style | Ring | Visual form of the indicator (ring, dots, or bars) |+| Refresh duration | 1200ms | How long the "refreshing" state holds before the content updates and snaps back |+| Resting offset | 64px | Fixed distance the list is held down while refreshing so the spinner stays in view |++## Production notes+- **Only claim the gesture at the top.** Check `scrollTop === 0` (or `<= 0`) before hijacking the drag, otherwise mid-list downward scrolls get swallowed and the list feels stuck.+- **`touch-action` and passive listeners.** Set `touch-action: pan-y` on the scroller so vertical scrolling still works; if you `preventDefault` inside the pull, the move listener cannot be `{ passive: true }`. At the boundary there is nothing to scroll, so the transform reads cleanly without fighting native scroll.+- **`overscroll-behavior: contain`** stops the browser's own overscroll glow/bounce and prevents the pull from chaining to the page or a parent scroller.+- **Native browser PTR conflicts.** Mobile browsers ship a built-in pull-to-refresh on the document. Keep your gesture inside a nested scroll container (not the page root), and use `overscroll-behavior-y: contain` on `html`/`body` in production so the browser's reload does not fire on top of yours.+- **Accessibility alternative.** A drag gesture is not reachable by keyboard or assistive tech, so always expose the same action as a real control — this demo wires a "Refresh now" button to the identical code path and announces state through an `aria-live` region. Respect `prefers-reduced-motion` by snapping without the elastic tween.+- **Library equivalents**: Framer Motion can drive the same pull with a `useMotionValue` + `useTransform` on drag and an `onDragEnd` threshold check; PullToRefresh.js wraps the pattern for plain sites; iOS `UIRefreshControl` and Android `SwipeRefreshLayout` are the native platform equivalents.++## See also+- [Swipe to Dismiss](../swipe-to-dismiss/) — the horizontal sibling: pointer drag with a distance/velocity threshold+- [Loading Spinner](../loading-spinner/) — the indicator this gesture reveals, on its own+- [Drawer Slide](../drawer-slide/) — another gesture-driven translate that settles at a resting offsetdiff --git a/animations/04-micro-interactions/pull-to-refresh/index.html b/animations/04-micro-interactions/pull-to-refresh/index.htmlnew file mode 100644index 00000000..b5bc917d--- /dev/null+++ b/animations/04-micro-interactions/pull-to-refresh/index.html@@ -0,0 +1,222 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Pull to Refresh — Animation Handbook</title>+ <meta name="description" content="Drag the list down from the top past a threshold to spin up a refresh, then release to load new items.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/pull-to-refresh/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Pull to Refresh — Animation Handbook">+ <meta property="og:description" content="Drag the list down from the top past a threshold to spin up a refresh, then release to load new items.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/pull-to-refresh/">+ <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="Pull to Refresh — Animation Handbook">+ <meta name="twitter:description" content="Drag the list down from the top past a threshold to spin up a refresh, then release to load new items.">+ <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": "Pull to Refresh", "name": "Pull to Refresh", "description": "Drag the list down from the top past a threshold to spin up a refresh, then release to load new items.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/pull-to-refresh/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Pull to Refresh"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff9d5c;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--stage-h:600px;--ind:64px}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(11px,1.8vw,15px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ .stage{position:relative;height:var(--stage-h);border:1px solid var(--ui-border);border-radius:8px;background:var(--bg);overflow:hidden}+ /* Indicator zone sits just above the visible top edge; it slides down with the pull */+ .indicator{position:absolute;top:calc(var(--ind)*-1);left:0;right:0;height:var(--ind);display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ui-muted);font-size:10px;will-change:transform}+ .indicator.ready{color:var(--ui-accent)}+ .hint{letter-spacing:.06em;text-transform:uppercase}+ .spin{width:26px;height:26px;position:relative;opacity:0;will-change:transform}+ .spin>*{display:none;position:absolute;inset:0}+ .spin.s-ring .ring{display:block;border-radius:50%;border:3px solid rgba(255,255,255,.14);border-top-color:var(--ui-accent)}+ .spin.s-dots .dots{display:flex;align-items:center;justify-content:center;gap:5px}+ .spin.s-dots .dots i{width:7px;height:7px;border-radius:50%;background:var(--ui-accent)}+ .spin.s-bars .bars{display:flex;align-items:center;justify-content:center;gap:4px}+ .spin.s-bars .bars i{width:5px;height:16px;border-radius:2px;background:var(--ui-accent)}+ /* Continuous "refreshing" motion, per style */+ .spin.spinning{opacity:1!important;transform:none!important}+ .spin.spinning.s-ring .ring{animation:ah-rot .7s linear infinite}+ .spin.spinning.s-dots i{animation:ah-blink .9s ease-in-out infinite}+ .spin.spinning.s-dots i:nth-child(2){animation-delay:.15s}+ .spin.spinning.s-dots i:nth-child(3){animation-delay:.3s}+ .spin.spinning.s-bars i{animation:ah-stretch .8s ease-in-out infinite}+ .spin.spinning.s-bars i:nth-child(2){animation-delay:.12s}+ .spin.spinning.s-bars i:nth-child(3){animation-delay:.24s}+ .spin.spinning.s-bars i:nth-child(4){animation-delay:.36s}+ @keyframes ah-rot{to{transform:rotate(360deg)}}+ @keyframes ah-blink{0%,100%{opacity:.25;transform:scale(.7)}50%{opacity:1;transform:scale(1)}}+ @keyframes ah-stretch{0%,100%{transform:scaleY(.4)}50%{transform:scaleY(1)}}+ /* Scrollable list — the pull is only claimed when scrollTop is 0 */+ .scroller{position:absolute;inset:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;will-change:transform;padding:10px}+ .list{display:flex;flex-direction:column;gap:8px}+ .card{border:1px solid var(--ui-border);background:var(--ui-bg);border-radius:10px;padding:12px 14px;display:flex;align-items:center;gap:12px}+ .card.fresh{animation:ah-in .34s cubic-bezier(.22,1,.36,1)}+ @keyframes ah-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}+ .dot{width:8px;height:8px;border-radius:50%;background:var(--ui-accent);flex-shrink:0}+ .card.old .dot{background:var(--ui-muted)}+ .meta{min-width:0}+ .meta .t{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}+ .meta .s{font-size:10px;color:var(--ui-muted);margin-top:2px}+ aside{width:clamp(200px,24vw,260px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:12px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+ .sr{display:flex;align-items:center;gap:6px;font-size:10px}+ .sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+ .sval{width:52px;text-align:right;color:var(--ui-text)}+ select{width:100%;min-height:44px;background:var(--bg);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:4px;font-family:var(--mono);font-size:10px;padding:0 8px}+ select:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}+ .div{height:1px;background:var(--ui-border)}+ .btn{background:transparent;border:1px solid var(--ui-border);color:var(--ui-text);font-family:var(--mono);font-size:10px;padding:14px 8px;border-radius:4px;cursor:pointer;width:100%;min-height:44px}+ .btn:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}+ @media(hover:hover){.btn:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}+ .status{font-size:10px;color:var(--ui-muted);min-height:14px}+ @media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:60vh;min-height:380px}}+ @media(prefers-reduced-motion:reduce){.scroller,.indicator{transition:none!important}.card.fresh{animation:none}}+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../segmented-control/" rel="prev" title="Previous">‹ Prev</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/pull-to-refresh/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Pull to Refresh</h1>+ <p>Drag the list down from the top past a threshold to spin up a refresh, then release to load new items.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage">+ <div class="indicator" id="indicator">+ <div class="spin s-ring" id="spin"><span class="ring"></span><span class="dots"><i></i><i></i><i></i></span><span class="bars"><i></i><i></i><i></i><i></i></span></div>+ <span class="hint" id="hint">Pull to refresh</span>+ </div>+ <div class="scroller" id="scroller"><div class="list" id="list"></div></div>+ </div>+ </div>+ <aside>+ <p class="note">The list follows your drag with rubber-band resistance — the further you pull, the more it fights back. Release past the threshold to trigger a refresh; short pulls snap back.</p>+ <div class="lbl">Pull threshold</div>+ <div class="sr"><input type="range" id="th" min="40" max="120" value="64" step="4"><span class="sval" id="thv">64px</span></div>+ <div class="lbl">Resistance</div>+ <div class="sr"><input type="range" id="re" min="1" max="4" value="2" step="0.5"><span class="sval" id="rev">2.0×</span></div>+ <div class="lbl">Spinner style</div>+ <select id="style"><option value="ring">Ring</option><option value="dots">Dots</option><option value="bars">Bars</option></select>+ <div class="lbl">Refresh duration</div>+ <div class="sr"><input type="range" id="du" min="400" max="2400" value="1200" step="200"><span class="sval" id="duv">1200ms</span></div>+ <div class="div"></div>+ <button class="btn" id="trigger" type="button">↻ Refresh now</button>+ <p class="status" id="status" role="status" aria-live="polite"></p>+ </aside>+</div>+<script>+ const scroller=document.getElementById('scroller');+ const indicator=document.getElementById('indicator');+ const spin=document.getElementById('spin');+ const hint=document.getElementById('hint');+ const listEl=document.getElementById('list');+ const statusEl=document.getElementById('status');+ const INDH=64; // resting offset held while refreshing+ const reduce=window.matchMedia('(prefers-reduced-motion:reduce)').matches;+ let threshold=64, resistance=2, dur=1200;+ let startY=0, pulling=false, pull=0, refreshing=false, n=0;++ const SEED=['Design review moved to 3pm','Build #482 passed on main','Ana commented on your PR','Weekly metrics are ready','Invoice from Northwind paid','Standup notes posted'];+ function card(text,fresh){+ const el=document.createElement('div');+ el.className='card'+(fresh?' fresh':' old');+ el.innerHTML='<span class="dot"></span><div class="meta"><div class="t">'+text+'</div><div class="s">'+(fresh?'just now':'earlier')+'</div></div>';+ return el;+ }+ SEED.forEach(t=>listEl.appendChild(card(t,false)));++ // Move both the indicator and the list by the same amount; optionally tween.+ function setY(y,animate){+ const t=(animate&&!reduce)?'transform .34s cubic-bezier(.22,1,.36,1)':'none';+ scroller.style.transition=t; indicator.style.transition=t;+ scroller.style.transform='translateY('+y+'px)';+ indicator.style.transform='translateY('+y+'px)';+ }+ // Rubber-band: near 1:1 at first, asymptotic as the drag grows.+ function resist(dy){ const max=threshold*2.2; return max*dy/(dy+max*resistance); }+ function drawSpin(){+ const p=Math.min(pull/threshold,1);+ spin.style.opacity=String(p);+ spin.style.transform='rotate('+(pull*2.2)+'deg) scale('+(0.55+p*0.45)+')';+ indicator.classList.toggle('ready',p>=1);+ hint.textContent=p>=1?'Release to refresh':'Pull to refresh';+ }++ scroller.addEventListener('pointerdown',e=>{+ if(refreshing)return;+ startY=e.clientY; pulling=false;+ });+ scroller.addEventListener('pointermove',e=>{+ if(refreshing)return;+ const dy=e.clientY-startY;+ if(!pulling){ // only claim the gesture at the very top+ if(dy>4 && scroller.scrollTop<=0){ pulling=true; try{scroller.setPointerCapture(e.pointerId);}catch(_){} }+ else return;+ }+ if(dy<=0){ pull=0; setY(0,false); drawSpin(); pulling=false; return; }+ pull=resist(dy);+ setY(pull,false); drawSpin();+ });+ function release(){+ if(refreshing||!pulling)return;+ pulling=false;+ if(pull>=threshold){ startRefresh(); }+ else { pull=0; setY(0,true); drawSpin(); }+ }+ scroller.addEventListener('pointerup',release);+ scroller.addEventListener('pointercancel',release);++ function startRefresh(){+ if(refreshing)return;+ refreshing=true; pull=INDH;+ setY(INDH,true);+ indicator.classList.add('ready');+ hint.textContent='Refreshing…';+ spin.style.transform=''; spin.classList.add('spinning');+ statusEl.textContent='Refreshing…';+ setTimeout(()=>{+ n++;+ listEl.insertBefore(card('New update #'+n+' arrived',true),listEl.firstChild);+ scroller.scrollTop=0;+ spin.classList.remove('spinning');+ pull=0; setY(0,true); drawSpin();+ refreshing=false;+ statusEl.textContent='Updated — 1 new item added.';+ },dur);+ }++ // Controls+ const $=id=>document.getElementById(id);+ $('th').addEventListener('input',e=>{ threshold=+e.target.value; $('thv').textContent=threshold+'px'; });+ $('re').addEventListener('input',e=>{ resistance=+e.target.value; $('rev').textContent=(+e.target.value).toFixed(1)+'×'; });+ $('du').addEventListener('input',e=>{ dur=+e.target.value; $('duv').textContent=dur+'ms'; });+ $('style').addEventListener('change',e=>{ spin.className='spin s-'+e.target.value; });+ $('trigger').addEventListener('click',startRefresh); // keyboard/button fallback+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/04-micro-interactions/segmented-control/README.md b/animations/04-micro-interactions/segmented-control/README.mdnew file mode 100644index 00000000..4d412d76--- /dev/null+++ b/animations/04-micro-interactions/segmented-control/README.md@@ -0,0 +1,98 @@+# Segmented Control++## What it is++A segmented control is a row of two or more mutually exclusive options with a+single highlighted "pill" indicating the current choice. When the selection+changes, that indicator slides from the old option to the new one and the+label colors crossfade, so the change reads as one object moving rather than+two states blinking. It is the desktop and mobile pattern behind iOS view+switchers, filter bars, and time-range pickers.++## When to use it++- Switching between a small, fixed set of views (Day / Week / Month).+- Filtering a list by one exclusive facet where all options fit on one line.+- Replacing a dropdown when there are 2–5 short options and you want them all+ visible at once.+- Any place a radio group would work but you want the options laid out+ horizontally with a clear moving selection.++Avoid it when options are numerous, have long labels, or wrap to multiple+lines — a dropdown or tab list scales better there.++## How it works++The indicator is a single absolutely-positioned element. It never animates+`left` or `width`; instead JavaScript measures the target segment's geometry+and drives the motion entirely with `transform`, which the compositor can+animate without layout work. `translateX` moves the pill to the segment's+offset; `scaleX` stretches a fixed reference width to match segments of+different widths. The label color transition runs on the same duration so the+crossfade lands as the pill arrives.++```js+function move(i, animate) {+ const target = opts[i].getBoundingClientRect();+ const base = opts[0].getBoundingClientRect(); // reference width+ const x = opts[i].offsetLeft; // absolute offset in track+ const sx = target.width / base.width; // scaleX to fit this segment+ if (!animate) ind.style.transition = 'none'; // no slide on first paint+ ind.style.width = base.width + 'px';+ ind.style.setProperty('--x', x + 'px');+ ind.style.setProperty('--sx', sx);+ if (!animate) requestAnimationFrame(() => ind.style.transition = '');+}+```++```css+.seg-ind {+ transform-origin: left center;+ transform: translateX(var(--x)) scaleX(var(--sx));+ transition: transform var(--dur) var(--ease);+}+```++Because `transform-origin` is the left edge, `scaleX` grows the pill to the+right from the segment's left boundary, keeping it aligned as widths change.++## Key parameters++| Parameter | What it controls | Typical value |+| --- | --- | --- |+| `duration` | How long the pill takes to travel | 250–400ms |+| `easing` | The travel curve | spring `cubic-bezier(.5,1.6,.4,1)` or `cubic-bezier(.4,0,.2,1)` |+| `translateX` | Horizontal position of the pill | measured `offsetLeft` of target |+| `scaleX` | Width match for uneven segments | `targetWidth / referenceWidth` |+| indicator style | Filled pill vs. thin underline | `filled` / `underline` |+| segment count | Number of exclusive options | 2–5 |++A spring curve with slight overshoot (control-point y > 1) gives the pill a+sense of momentum; a standard ease reads as more restrained. Keep the label+color transition on the same `duration` so the two never desync.++## Production notes++- **Semantics and keyboard.** Expose the group as `role="radiogroup"` with+ `role="radio"` children (or a `tablist` if each option swaps a panel). Use a+ roving `tabindex` — only the selected option is tab-stoppable — and handle+ Arrow keys, Home, and End to move selection. This demo does exactly that.+- **Recompute geometry.** Widths depend on rendered text, so the pill can be+ misplaced before a web font swaps in. Re-run the measure step on `resize`+ and inside `document.fonts.ready`, and whenever you rebuild the segments.+- **RTL.** In right-to-left layouts `offsetLeft` still measures from the left,+ but reading order flips; verify the arrow-key direction and pill origin, and+ test with `dir="rtl"` rather than assuming.+- **Reduced motion.** Under `prefers-reduced-motion: reduce` the transition is+ removed so selection snaps instantly — the state change is still clear+ without travel.+- **Libraries.** Frameworks wrap this in components (Radix / React Aria+ `ToggleGroup`, Material's segmented button, SwiftUI `Picker(.segmented)`),+ and GSAP or Framer Motion can drive the `transform` with a spring; the+ underlying measure-then-translate mechanic is identical.++## See also++- [Toggle / Switch Slide](../toggle-switch/)+- [Tab Bar / Underline](../hover-state/)+- [Accordion Open/Close](../accordion/)diff --git a/animations/04-micro-interactions/segmented-control/index.html b/animations/04-micro-interactions/segmented-control/index.htmlnew file mode 100644index 00000000..75751cdb--- /dev/null+++ b/animations/04-micro-interactions/segmented-control/index.html@@ -0,0 +1,188 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1.0">+<title>Segmented Control — Animation Handbook</title>+ <meta name="description" content="A highlighted pill slides between options; the active label crossfades as it lands.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/segmented-control/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Segmented Control — Animation Handbook">+ <meta property="og:description" content="A highlighted pill slides between options; the active label crossfades as it lands.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/segmented-control/">+ <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="Segmented Control — Animation Handbook">+ <meta name="twitter:description" content="A highlighted pill slides between options; the active label crossfades as it lands.">+ <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": "Segmented Control", "name": "Segmented Control", "description": "A highlighted pill slides between options; the active label crossfades as it lands.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/segmented-control/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Segmented Control"}</script>+<style>+@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+@font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+@font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+:root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff9d5c;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--dur:340ms;--ease:cubic-bezier(.5,1.6,.4,1)}+*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+header{margin-bottom:20px}+header h1{font-family:var(--disp);font-weight:700;font-size:clamp(11px,1.8vw,15px);letter-spacing:-.01em}+header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+.layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+.stage-wrap{flex:1;min-width:0}+.stage{border:1px solid var(--ui-border);border-radius:8px;background:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;padding:clamp(28px,6vw,64px) 20px;min-height:clamp(280px,42vh,420px)}+/* Segmented control */+.seg{position:relative;display:inline-flex;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:12px;padding:4px;max-width:100%;overflow:hidden}+.seg-ind{position:absolute;top:4px;left:0;height:calc(100% - 8px);border-radius:9px;background:var(--ui-accent);transform-origin:left center;transform:translateX(var(--x,0)) scaleX(var(--sx,1));width:var(--w,0);transition:transform var(--dur) var(--ease);will-change:transform;z-index:0}+.seg.underline .seg-ind{top:auto;bottom:2px;height:2px;border-radius:2px}+.seg-opt{position:relative;z-index:1;appearance:none;background:none;border:0;cursor:pointer;font-family:var(--mono);font-size:clamp(11px,1.4vw,13px);color:var(--ui-muted);padding:0 clamp(12px,2.4vw,22px);min-height:44px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:9px;transition:color var(--dur) var(--ease);outline:none;-webkit-tap-highlight-color:transparent}+.seg-opt[aria-checked="true"]{color:#0b0b0d;font-weight:500}+.seg.underline .seg-opt[aria-checked="true"]{color:var(--ui-accent)}+.seg-opt:focus-visible{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--ui-accent)}+@media(hover:hover){.seg-opt:not([aria-checked="true"]):hover{color:var(--ui-text)}}+.readout{font-size:11px;color:var(--ui-muted)}+.readout b{color:var(--ui-text);font-weight:500}+/* Controls */+aside{width:clamp(210px,24vw,260px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:12px}+.note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+.lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+.div{height:1px;background:var(--ui-border)}+.sr{display:flex;align-items:center;gap:6px;font-size:10px}+.sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+.sval{width:52px;text-align:right;color:var(--ui-text)}+select{background:var(--bg);border:1px solid var(--ui-border);color:var(--ui-text);font-family:var(--mono);font-size:10px;padding:8px 6px;border-radius:4px;width:100%;min-height:44px}+@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}}+@media(prefers-reduced-motion:reduce){.seg-ind,.seg-opt{transition:none!important}}+</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../toast-notification/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../pull-to-refresh/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/segmented-control/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Segmented Control</h1>+ <p>A highlighted pill slides between options; the active label crossfades as it lands.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage">+ <div class="seg" id="seg" role="radiogroup" aria-label="View mode"></div>+ <div class="readout">Selected: <b id="ro">—</b></div>+ </div>+ </div>+ <aside>+ <p class="note">The indicator never animates left/width. JS measures the target button, then drives transform: translateX + scaleX so motion stays on the compositor.</p>+ <div class="lbl">Segments</div>+ <div class="sr"><input type="range" id="count" min="2" max="6" value="4" step="1"><span class="sval" id="count-v">4</span></div>+ <div class="lbl">Slide duration</div>+ <div class="sr"><input type="range" id="dur" min="80" max="700" value="340" step="10"><span class="sval" id="dur-v">340ms</span></div>+ <div class="lbl">Easing</div>+ <select id="ease">+ <option value="cubic-bezier(.5,1.6,.4,1)" selected>Spring (overshoot)</option>+ <option value="cubic-bezier(.4,0,.2,1)">Material smooth</option>+ <option value="ease-in-out">Ease in-out</option>+ <option value="ease-out">Ease out</option>+ <option value="linear">Linear</option>+ </select>+ <div class="lbl">Indicator style</div>+ <select id="style">+ <option value="filled" selected>Filled pill</option>+ <option value="underline">Underline</option>+ </select>+ <div class="div"></div>+ <p style="font-size:10px;color:var(--ui-muted)">Click a segment, or focus it and use ← → arrows.</p>+ </aside>+</div>+<script>+const LABELS=['Day','Week','Month','Year','Decade','All'];+const seg=document.getElementById('seg'),ind=Object.assign(document.createElement('span'),{className:'seg-ind'});+const ro=document.getElementById('ro');+let opts=[],current=0;++function build(n){+ seg.innerHTML='';seg.appendChild(ind);opts=[];+ for(let i=0;i<n;i++){+ const b=document.createElement('button');+ b.type='button';b.className='seg-opt';b.setAttribute('role','radio');b.textContent=LABELS[i];+ b.setAttribute('aria-checked','false');+ b.tabIndex=-1;+ b.addEventListener('click',()=>select(i));+ seg.appendChild(b);opts.push(b);+ }+ current=Math.min(current,n-1);+ // measure once from a neutral position, then animate future moves+ requestAnimationFrame(()=>{move(current,false);paint();});+}++// Measure the target segment and translate the indicator to it.+function move(i,animate){+ const g=opts[i].getBoundingClientRect(),base=opts[0].getBoundingClientRect();+ const x=opts[i].offsetLeft; // absolute offset inside the track+ const sx=g.width/base.width; // scaleX to match differing widths+ if(!animate)ind.style.transition='none';+ ind.style.width=base.width+'px'; // fixed reference width; scaleX does the rest+ ind.style.setProperty('--x',x+'px');+ ind.style.setProperty('--sx',sx);+ if(!animate)requestAnimationFrame(()=>ind.style.transition='');+}++function paint(){+ opts.forEach((b,i)=>{+ const on=i===current;+ b.setAttribute('aria-checked',on?'true':'false');+ b.tabIndex=on?0:-1;+ });+ ro.textContent=LABELS[current];+}++function select(i){+ if(i===current){opts[i].focus();return;}+ current=i;move(i,true);paint();opts[i].focus();+}++// Roving-tabindex arrow navigation for the radiogroup.+seg.addEventListener('keydown',e=>{+ const n=opts.length;let t=current;+ if(e.key==='ArrowRight'||e.key==='ArrowDown')t=(current+1)%n;+ else if(e.key==='ArrowLeft'||e.key==='ArrowUp')t=(current-1+n)%n;+ else if(e.key==='Home')t=0;+ else if(e.key==='End')t=n-1;+ else return;+ e.preventDefault();select(t);+});++// Recompute geometry when the box reflows or a font swaps in.+addEventListener('resize',()=>move(current,false));+if(document.fonts&&document.fonts.ready)document.fonts.ready.then(()=>move(current,false));++// Controls+const R=document.documentElement.style;+document.getElementById('count').addEventListener('input',e=>{+ document.getElementById('count-v').textContent=e.target.value;build(+e.target.value);+});+document.getElementById('dur').addEventListener('input',e=>{+ document.getElementById('dur-v').textContent=e.target.value+'ms';R.setProperty('--dur',e.target.value+'ms');+});+document.getElementById('ease').addEventListener('change',e=>R.setProperty('--ease',e.target.value));+document.getElementById('style').addEventListener('change',e=>{+ seg.classList.toggle('underline',e.target.value==='underline');+ requestAnimationFrame(()=>move(current,false));+});++build(4);+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/04-micro-interactions/shimmer-effect/index.html b/animations/04-micro-interactions/shimmer-effect/index.htmlindex 9ab5e72b..7388986c 100644--- a/animations/04-micro-interactions/shimmer-effect/index.html+++ b/animations/04-micro-interactions/shimmer-effect/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Shimmer Effect</title>+ <title>Shimmer Effect — Animation Handbook</title>+ <meta name="description" content="Gradient sweep over skeleton placeholders — gives the impression of data streaming in.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/shimmer-effect/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Shimmer Effect — Animation Handbook">+ <meta property="og:description" content="Gradient sweep over skeleton placeholders — gives the impression of data streaming in.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/shimmer-effect/">+ <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="Shimmer Effect — Animation Handbook">+ <meta name="twitter:description" content="Gradient sweep over skeleton placeholders — gives the impression of data streaming in.">+ <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": "Shimmer Effect", "name": "Shimmer Effect", "description": "Gradient sweep over skeleton placeholders — gives the impression of data streaming in.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/shimmer-effect/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Shimmer Effect"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -49,8 +63,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:440px}}@media(prefers-reduced-motion:reduce){.skel-card::after,.skel-row::after{animation:none!important;opacity:.3}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../skeleton-loader/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../loading-spinner/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/shimmer-effect/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Shimmer Effect</h1><p>Gradient sweep over skeleton placeholders — gives the impression of data streaming in.</p>@@ -121,5 +149,6 @@document.documentElement.style.setProperty('--shim-color',e.target.value);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/skeleton-loader/index.html b/animations/04-micro-interactions/skeleton-loader/index.htmlindex 82da6617..85f77ebd 100644--- a/animations/04-micro-interactions/skeleton-loader/index.html+++ b/animations/04-micro-interactions/skeleton-loader/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Skeleton Loader</title>+ <title>Skeleton Loader — Animation Handbook</title>+ <meta name="description" content="Pulsing placeholder blocks match the shape of real content — reduces perceived wait time.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/skeleton-loader/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Skeleton Loader — Animation Handbook">+ <meta property="og:description" content="Pulsing placeholder blocks match the shape of real content — reduces perceived wait time.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/skeleton-loader/">+ <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="Skeleton Loader — Animation Handbook">+ <meta name="twitter:description" content="Pulsing placeholder blocks match the shape of real content — reduces perceived wait time.">+ <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": "Skeleton Loader", "name": "Skeleton Loader", "description": "Pulsing placeholder blocks match the shape of real content — reduces perceived wait time.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/skeleton-loader/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Skeleton Loader"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -58,8 +72,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:400px}}@media(prefers-reduced-motion:reduce){.skel{animation:none!important;opacity:.6}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../success-confetti/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../shimmer-effect/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/skeleton-loader/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Skeleton Loader</h1><p>Pulsing placeholder blocks match the shape of real content — reduces perceived wait time.</p>@@ -151,5 +179,6 @@document.getElementById('reload-btn').addEventListener('click',startLoad);startLoad();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/star-rating/README.md b/animations/04-micro-interactions/star-rating/README.mdnew file mode 100644index 00000000..0077b1c0--- /dev/null+++ b/animations/04-micro-interactions/star-rating/README.md@@ -0,0 +1,47 @@+# Star Rating++## What it is+An interactive five-star control for capturing a rating. Moving the pointer across the row fills the stars up to the pointer with an accent color; the fill cascades smoothly as you move. Clicking (or tapping) commits that value and plays a short scale pop on the selected star. Arrow keys drive the same control from the keyboard, and an option lets each star resolve to a half.++## When to use it+- Product, review, and feedback forms where a coarse 1–5 score is enough+- Post-purchase or post-support surveys ("How did we do?")+- Content or media ratings shown inline in a card or detail view+- Any place a numeric input would feel heavier than a quick tap+- Not for precise measurements — five (or ten) buckets is the whole point; use a slider or number field when finer values matter++## How it works+Each star is two stacked shapes in one box: a muted outline drawn with `currentColor`, and an accent-colored fill. A full star is just a color swap on the outline; a half star reveals an overlaid accent copy clipped to the left 50%. Because the swap is a `transition` on `color`, sweeping the pointer across the row makes the stars fill one after another — the animation is the cascade, not a per-star width tween. Committing retriggers a `transform: scale` pop on the chosen star:++```css+.star{ color: var(--ui-muted); transition: color var(--fill-dur) ease; }+.star.full{ color: var(--ui-accent); }+.star .half{ position:absolute; width:50%; overflow:hidden; color:var(--ui-accent); opacity:0; }+.star.half-on .half{ opacity:1; }++@keyframes pop{ 0%{transform:scale(1)} 35%{transform:scale(var(--pop))} 70%{transform:scale(.94)} 100%{transform:scale(1)} }+.star.pop{ animation:pop .42s cubic-bezier(.22,1,.36,1); }+```++The pointer position within a star decides the value — left half rounds to `.5`, right half to the whole — and `pointermove`/`pointerleave` preview it without committing. The pop is re-fired by removing and re-adding the `pop` class (`star.classList.remove('pop'); void star.offsetWidth; star.classList.add('pop')`) so repeated commits always animate.++## Key parameters+| Parameter | Default | Effect |+|-----------|---------|--------|+| Star count | 5 | How many buckets; the control rebuilds and `aria-valuemax` follows |+| Pop intensity | 1.35× | Peak scale of the commit pop. Above ~1.6 reads as rubbery |+| Fill duration | 180ms | Color-transition time per star — the perceived smoothness of the cascade |+| Allow half-stars | off | Switches the step and pointer rounding between 1 and 0.5 |++## Production notes+- **Accessibility**: this demo exposes the row as a single `role="slider"` with `aria-valuemin/max/now` and an `aria-valuetext` ("3 out of 5"), which handles half-steps cleanly from the keyboard. A `role="radiogroup"` of `radio` stars is the other idiomatic choice and maps better to discrete whole-star ratings; pick the model that matches whether half values exist.+- **Keyboard**: arrow keys step by the current increment, Home clears to 0, End jumps to max. The control must be focusable (`tabindex="0"`) and show a visible focus ring — rating with the mouse only is not enough.+- **Don't rely on color alone**: fill is reinforced by the numeric readout below the row so the value survives for colorblind users and greyscale. Never encode the score in hue by itself.+- **Half-star handling**: resolve the half from the pointer's horizontal position inside the hovered star, and keep the committed value and the hover preview separate so leaving the row restores the committed rating rather than a stray hover state.+- **Touch targets**: each star box is at least 44×44px and the control uses Pointer Events, so hover-preview and tap-to-commit both work on touch. Hover styling is gated behind `@media (hover: hover)`.+- **Library equivalents**: Framer Motion can drive the pop with a `whileTap`/`animate` scale spring; many form kits (e.g. rating inputs in headless UI libraries) ship the radiogroup semantics so you only style the stars.++## See also+- [Heart Burst](../heart-burst/) — a sibling reward interaction where the commit is a particle burst instead of a fill+- [Button Press Scale](../button-press-scale/) — the scale-overshoot mechanic behind the star pop+- [Toggle / Switch Slide](../toggle-switch/) — another small, committed form control with a state animationdiff --git a/animations/04-micro-interactions/star-rating/index.html b/animations/04-micro-interactions/star-rating/index.htmlnew file mode 100644index 00000000..23ec9426--- /dev/null+++ b/animations/04-micro-interactions/star-rating/index.html@@ -0,0 +1,196 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Star Rating — Animation Handbook</title>+ <meta name="description" content="Hover or tap to fill the stars up to the pointer; click commits the rating with a small pop on the selected star.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/star-rating/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Star Rating — Animation Handbook">+ <meta property="og:description" content="Hover or tap to fill the stars up to the pointer; click commits the rating with a small pop on the selected star.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/star-rating/">+ <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="Star Rating — Animation Handbook">+ <meta name="twitter:description" content="Hover or tap to fill the stars up to the pointer; click commits the rating with a small pop on the selected star.">+ <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": "Star Rating", "name": "Star Rating", "description": "Hover or tap to fill the stars up to the pointer; click commits the rating with a small pop on the selected star.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/star-rating/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Star Rating"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff9d5c;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--star:clamp(44px,11vw,60px);--pop:1.35;--fill-dur:180ms}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(16px,2.2vw,22px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ .stage{border:1px solid var(--ui-border);border-radius:8px;background:var(--bg);min-height:clamp(280px,42vh,420px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(18px,4vh,32px);padding:clamp(16px,4vw,40px)}+ /* Rating control */+ .rate{display:inline-flex;gap:clamp(4px,1.5vw,12px);outline:none;touch-action:none}+ .rate:focus-visible{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--ui-accent);border-radius:8px}+ .star{position:relative;width:var(--star);height:var(--star);color:var(--ui-muted);cursor:pointer;transition:color var(--fill-dur) ease;-webkit-tap-highlight-color:transparent;transform-origin:center;will-change:transform}+ .star svg{position:absolute;inset:0;width:100%;height:100%;display:block}+ .star .half{position:absolute;left:0;top:0;height:100%;width:50%;overflow:hidden;color:var(--ui-accent);opacity:0}+ .star .half svg{width:var(--star)}+ .star.full{color:var(--ui-accent)}+ .star.half-on .half{opacity:1}+ @keyframes pop{0%{transform:scale(1)}35%{transform:scale(var(--pop))}70%{transform:scale(.94)}100%{transform:scale(1)}}+ .star.pop{animation:pop .42s cubic-bezier(.22,1,.36,1)}+ .value{font-family:var(--disp);font-weight:700;font-size:clamp(20px,5vw,32px)}+ .value small{font-family:var(--mono);font-weight:400;font-size:clamp(11px,1.6vw,14px);color:var(--ui-muted)}+ .hint{font-size:10px;color:var(--ui-muted);text-align:center;max-width:32ch;line-height:1.6}+ /* Controls */+ aside{width:clamp(200px,24vw,250px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl2{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent);margin-top:4px}+ .div{height:1px;background:var(--ui-border)}+ .sr{display:flex;align-items:center;gap:6px;font-size:10px}+ .sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+ .sval{width:56px;text-align:right;color:var(--ui-text)}+ .row{display:flex;align-items:center;justify-content:space-between;font-size:10px;min-height:44px}+ .row span{color:var(--ui-muted)}+ .tog{position:relative;width:44px;height:26px;border-radius:13px;background:#2a2a30;border:1px solid var(--ui-border);cursor:pointer;flex-shrink:0}+ .tog::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:var(--ui-text);transition:transform .18s ease}+ .tog[aria-checked=true]{background:var(--ui-accent)}+ .tog[aria-checked=true]::after{transform:translateX(18px)}+ .kv{display:flex;justify-content:space-between;font-size:10px;color:var(--ui-muted)}+ .kv .v{color:var(--ui-text)}+ @media(hover:hover){.star:hover{color:var(--ui-accent)}}+ @media(max-width:600px){.layout{flex-direction:column}aside{width:100%}}+ @media(prefers-reduced-motion:reduce){.star{transition:none}.star.pop{animation:none}.tog::after{transition:none}}+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../copy-to-clipboard/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../toast-notification/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/star-rating/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Star Rating</h1>+ <p>Hover or tap to fill the stars up to the pointer; click commits the rating with a small pop on the selected star.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage">+ <div class="rate" id="rate" role="slider" tabindex="0" aria-label="Rating"+ aria-valuemin="0" aria-valuemax="5" aria-valuenow="3" aria-valuetext="3 out of 5"></div>+ <div class="value"><span id="val">3.0</span><small> / <span id="max">5</span></small></div>+ <p class="hint">Click a star, or focus the control and use the arrow keys. Home clears, End maxes out.</p>+ </div>+ </div>+ <aside>+ <p class="note">Each star is two stacked shapes: a muted outline and an accent fill. Filling is a color transition that cascades across the row as the pointer moves; committing plays a transform:scale pop on the chosen star.</p>+ <div class="lbl2">Star count</div>+ <div class="sr"><input type="range" id="cnt-sl" min="3" max="10" value="5" step="1"><span class="sval" id="cnt-v">5</span></div>+ <div class="lbl2">Pop intensity</div>+ <div class="sr"><input type="range" id="pop-sl" min="1" max="1.8" value="1.35" step="0.05"><span class="sval" id="pop-v">1.35×</span></div>+ <div class="lbl2">Fill duration</div>+ <div class="sr"><input type="range" id="dur-sl" min="0" max="500" value="180" step="20"><span class="sval" id="dur-v">180ms</span></div>+ <div class="div"></div>+ <div class="row"><span>Allow half-stars</span><button class="tog" id="half" role="switch" aria-checked="false" aria-label="Allow half-stars"></button></div>+ <div class="div"></div>+ <div class="kv"><span>Committed</span><span class="v" id="state-v">3.0</span></div>+ </aside>+</div>+<script>+const STAR='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14l-5-4.87 6.91-1.01L12 2z';+const rate=document.getElementById('rate'),valEl=document.getElementById('val'),maxEl=document.getElementById('max'),stateEl=document.getElementById('state-v');+const reduce=window.matchMedia('(prefers-reduced-motion: reduce)').matches;+let count=5,rating=3,step=1,pop=1.35;+const svg=c=>`<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="${STAR}"/></svg>`;++function build(){+ rate.innerHTML='';+ for(let i=0;i<count;i++){+ const s=document.createElement('span');+ s.className='star';s.dataset.i=i;+ s.innerHTML=svg()+'<span class="half">'+svg()+'</span>';+ rate.appendChild(s);+ }+ rate.setAttribute('aria-valuemax',count);+ maxEl.textContent=count;+ if(rating>count)rating=count;+ render(rating);commit(false);+}+// Paint stars up to value v (0..count), supporting halves.+function render(v){+ rate.querySelectorAll('.star').forEach((s,i)=>{+ s.classList.toggle('full',v>=i+1);+ s.classList.toggle('half-on',v>=i+0.5&&v<i+1);+ });+}+function commit(doPop){+ render(rating);+ valEl.textContent=rating.toFixed(1);+ stateEl.textContent=rating.toFixed(1);+ rate.setAttribute('aria-valuenow',rating);+ rate.setAttribute('aria-valuetext',rating+' out of '+count);+ if(doPop&&!reduce&&rating>0){+ const star=rate.querySelector('.star[data-i="'+(Math.ceil(rating)-1)+'"]');+ if(star){star.classList.remove('pop');void star.offsetWidth;star.classList.add('pop');}+ }+}+// Map a pointer position within a star to a rating value.+function valueAt(star,clientX){+ const i=+star.dataset.i,r=star.getBoundingClientRect();+ if(step===0.5&&clientX-r.left<r.width/2)return i+0.5;+ return i+1;+}+rate.addEventListener('pointermove',e=>{+ const star=e.target.closest('.star');if(star)render(valueAt(star,e.clientX));+});+rate.addEventListener('pointerleave',()=>render(rating));+rate.addEventListener('pointerdown',e=>{+ const star=e.target.closest('.star');if(!star)return;+ rating=valueAt(star,e.clientX);rate.focus();commit(true);+});+rate.addEventListener('keydown',e=>{+ let handled=true;+ if(e.key==='ArrowRight'||e.key==='ArrowUp')rating=Math.min(count,rating+step);+ else if(e.key==='ArrowLeft'||e.key==='ArrowDown')rating=Math.max(0,rating-step);+ else if(e.key==='Home')rating=0;+ else if(e.key==='End')rating=count;+ else handled=false;+ if(handled){e.preventDefault();commit(true);}+});+// Controls+document.getElementById('cnt-sl').addEventListener('input',e=>{+ count=+e.target.value;document.getElementById('cnt-v').textContent=count;build();+});+document.getElementById('pop-sl').addEventListener('input',e=>{+ pop=+e.target.value;document.documentElement.style.setProperty('--pop',pop);+ document.getElementById('pop-v').textContent=pop.toFixed(2)+'×';+});+document.getElementById('dur-sl').addEventListener('input',e=>{+ document.documentElement.style.setProperty('--fill-dur',e.target.value+'ms');+ document.getElementById('dur-v').textContent=e.target.value+'ms';+});+document.getElementById('half').addEventListener('click',e=>{+ const on=e.currentTarget.getAttribute('aria-checked')!=='true';+ e.currentTarget.setAttribute('aria-checked',on);+ step=on?0.5:1;+ if(!on)rating=Math.round(rating);+ commit(false);+});+build();+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/04-micro-interactions/success-confetti/index.html b/animations/04-micro-interactions/success-confetti/index.htmlindex 4af1c1fc..bc3bff7e 100644--- a/animations/04-micro-interactions/success-confetti/index.html+++ b/animations/04-micro-interactions/success-confetti/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Success Confetti</title>+ <title>Success Confetti — Animation Handbook</title>+ <meta name="description" content="Completing an action fires a canvas confetti burst — rectangles launched outward with gravity, spin, and fade.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/success-confetti/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Success Confetti — Animation Handbook">+ <meta property="og:description" content="Completing an action fires a canvas confetti burst — rectangles launched outward with gravity, spin, and fade.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/success-confetti/">+ <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="Success Confetti — Animation Handbook">+ <meta name="twitter:description" content="Completing an action fires a canvas confetti burst — rectangles launched outward with gravity, spin, and fade.">+ <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": "Success Confetti", "name": "Success Confetti", "description": "Completing an action fires a canvas confetti burst — rectangles launched outward with gravity, spin, and fade.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/success-confetti/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Success Confetti"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}@@ -34,8 +48,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px}}@media(prefers-reduced-motion:reduce){.order-btn:active{transform:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../heart-burst/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../skeleton-loader/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/success-confetti/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Success Confetti</h1><p>Completing an action fires a canvas confetti burst — rectangles launched outward with gravity, spin, and fade.</p>@@ -107,5 +135,6 @@ document.getElementById('cnt-sl').addEventListener('input',e=>{pCount=+e.target.document.getElementById('spr-sl').addEventListener('input',e=>{spreadDeg=+e.target.value;document.getElementById('spr-v').textContent=spreadDeg+'°';});document.getElementById('grv-sl').addEventListener('input',e=>{gravity=+e.target.value/100;document.getElementById('grv-v').textContent=gravity.toFixed(2);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/swipe-to-dismiss/index.html b/animations/04-micro-interactions/swipe-to-dismiss/index.htmlindex 14f0e11c..5fc01fd3 100644--- a/animations/04-micro-interactions/swipe-to-dismiss/index.html+++ b/animations/04-micro-interactions/swipe-to-dismiss/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Swipe to Dismiss</title>+ <title>Swipe to Dismiss — Animation Handbook</title>+ <meta name="description" content="Drag a card past the threshold (or fling it) to delete; release short and it springs back.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/swipe-to-dismiss/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Swipe to Dismiss — Animation Handbook">+ <meta property="og:description" content="Drag a card past the threshold (or fling it) to delete; release short and it springs back.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/swipe-to-dismiss/">+ <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="Swipe to Dismiss — Animation Handbook">+ <meta name="twitter:description" content="Drag a card past the threshold (or fling it) to delete; release short and it springs back.">+ <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": "Swipe to Dismiss", "name": "Swipe to Dismiss", "description": "Drag a card past the threshold (or fling it) to delete; release short and it springs back.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/swipe-to-dismiss/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Swipe to Dismiss"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -48,8 +62,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px}}@media(prefers-reduced-motion:reduce){.row,.card.settling,.card.flung{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../error-shake/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../hamburger-menu-toggle/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/swipe-to-dismiss/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Swipe to Dismiss</h1><p>Drag a card past the threshold (or fling it) to delete; release short and it springs back.</p>@@ -163,5 +191,6 @@build();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/theme-toggle-morph/README.md b/animations/04-micro-interactions/theme-toggle-morph/README.mdnew file mode 100644index 00000000..7c9bffed--- /dev/null+++ b/animations/04-micro-interactions/theme-toggle-morph/README.md@@ -0,0 +1,45 @@+# Theme Toggle Morph++## What it is+A single icon that animates between a sun and a crescent moon to signal a light/dark theme switch. Instead of swapping two static glyphs, the sun's rays retract and an SVG mask slides across the disc to carve a crescent, so the two states are visibly the same shape transforming. Clicking it also flips a small preview card between a light and dark palette so the theme change reads at a glance.++## When to use it+- The header or settings control that switches an interface between light and dark mode.+- Any binary appearance toggle where the two options have natural iconography (sun/moon, on/off, day/night).+- Places where a plain checkbox would feel abrupt and a short morph makes the state change legible without a full page flash.++Reach for a plain labelled switch instead when the control sits in a dense form, or when users may not read a sun/moon as "theme" without a text label beside it.++## How it works+The icon is one inline SVG: a filled `disc`, a group of eight `line` rays, and a `mask` containing a movable `cutout` circle. In the light state the cutout sits off the disc, so the disc renders whole and the rays are visible. Toggling adds a `.dark` class that scales the rays to zero from the icon's center and slides the cutout circle over the disc — the mask subtracts that overlap, leaving a crescent. A separate flip card rotates on the same duration and easing. Only `transform` and `opacity` animate.++```css+.icon line{transform-origin:12px 12px;+ transition:transform var(--morph-dur) var(--morph-ease),opacity var(--morph-dur) var(--morph-ease)}+.icon .cutout{transform:translate(20px,-20px); /* parked off the disc */+ transition:transform var(--morph-dur) var(--morph-ease)}+.demo.dark .icon line{transform:scale(0);opacity:0} /* rays retract */+.demo.dark .icon .cutout{transform:translate(7px,-4px)} /* slides in → crescent */+```++```html+<circle class="disc" cx="12" cy="12" r="5" mask="url(#moon-mask)"/>+```++## Key parameters++| Parameter | Default | Effect |+|-----------|---------|--------|+| `--morph-dur` | `500ms` | Length of the ray retraction, mask slide, and card flip. Under ~200ms the crescent forms too fast to read; over ~800ms it drags. |+| `--morph-ease` | `cubic-bezier(.4,0,.2,1)` | Timing curve. An overshoot curve adds a slight settle; linear feels mechanical. |+| `--toggle-size` | `104px` | Rendered icon size; the button padding scales with it. |+| cutout offset | `translate(7px,-4px)` | Final mask position. Larger offset yields a thinner crescent; smaller leaves a gibbous shape. |+| ray `transform-origin` | `12px 12px` | The point rays collapse toward. Off-center origins make them slide rather than shrink in place. |++## Production notes+The control is a real `<button>` with `aria-pressed` reflecting the current mode and an `aria-label` that names the *action* ("Switch to dark theme"), updated on each toggle so screen readers announce the change. The preview card is `aria-hidden` since it only illustrates the effect. On first load, read the user's stored preference and fall back to `prefers-color-scheme`: `const dark = localStorage.getItem('theme') === 'dark' || (localStorage.getItem('theme') === null && matchMedia('(prefers-color-scheme: dark)').matches)`, then set the class and `aria-pressed` before the button is interactive to avoid a flash. Persist the choice to `localStorage` on click so it survives reloads. Respect `prefers-reduced-motion: reduce` by dropping the transitions — the icon still snaps to the correct state, just without the morph. Icon sets like Feather ship the sun and moon as separate SVGs; the mask-based morph here is what libraries such as Framer Motion or GSAP would drive by tweening the mask offset and ray scale on the same timeline.++## See also+- [Toggle / Switch Slide](../toggle-switch/)+- [Hamburger Menu Toggle](../hamburger-menu-toggle/)+- [Checkmark Draw](../checkmark-draw/)diff --git a/animations/04-micro-interactions/theme-toggle-morph/index.html b/animations/04-micro-interactions/theme-toggle-morph/index.htmlnew file mode 100644index 00000000..2dbb6c59--- /dev/null+++ b/animations/04-micro-interactions/theme-toggle-morph/index.html@@ -0,0 +1,181 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Theme Toggle Morph — Animation Handbook</title>+ <meta name="description" content="A sun retracts its rays and slides a mask into a crescent moon — one icon animating between light and dark.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/theme-toggle-morph/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Theme Toggle Morph — Animation Handbook — Animation Handbook">+ <meta property="og:description" content="A sun retracts its rays and slides a mask into a crescent moon — one icon animating between light and dark.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/theme-toggle-morph/">+ <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="Theme Toggle Morph — Animation Handbook — Animation Handbook">+ <meta name="twitter:description" content="A sun retracts its rays and slides a mask into a crescent moon — one icon animating between light and dark.">+ <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": "Theme Toggle Morph — Animation Handbook", "name": "Theme Toggle Morph — Animation Handbook", "description": "A sun retracts its rays and slides a mask into a crescent moon — one icon animating between light and dark.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/theme-toggle-morph/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Theme Toggle Morph — Animation Handbook"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff9d5c;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--stage-h:620px;--morph-dur:500ms;--morph-ease:cubic-bezier(.4,0,.2,1);--toggle-size:104px}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(11px,1.8vw,15px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ .stage{height:var(--stage-h);border:1px solid var(--ui-border);border-radius:8px;background:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(28px,5vh,52px);padding:32px}+ /* The toggle button */+ .toggle{width:calc(var(--toggle-size) + 28px);height:calc(var(--toggle-size) + 28px);border-radius:50%;border:1px solid var(--ui-border);background:var(--ui-bg);color:var(--ui-accent);display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:color var(--morph-dur) var(--morph-ease),background var(--morph-dur) var(--morph-ease)}+ .toggle:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}+ .icon{width:var(--toggle-size);height:var(--toggle-size);display:block}+ .icon line{stroke:currentColor;stroke-width:2;stroke-linecap:round;transform-origin:12px 12px;transition:transform var(--morph-dur) var(--morph-ease),opacity var(--morph-dur) var(--morph-ease)}+ .icon .disc{fill:currentColor;transform-origin:12px 12px;transition:transform var(--morph-dur) var(--morph-ease)}+ .icon .cutout{transform:translate(20px,-20px);transition:transform var(--morph-dur) var(--morph-ease)}+ /* Dark / moon state */+ .demo.dark .toggle{color:#cdd3ff}+ .demo.dark .icon line{transform:scale(0);opacity:0}+ .demo.dark .icon .disc{transform:scale(1.28)}+ .demo.dark .icon .cutout{transform:translate(7px,-4px)}+ /* Flip preview card */+ .card{width:min(260px,80%);aspect-ratio:8/5;perspective:1000px}+ .card-inner{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform var(--morph-dur) var(--morph-ease)}+ .demo.dark .card-inner{transform:rotateY(180deg)}+ .face{position:absolute;inset:0;backface-visibility:hidden;border-radius:10px;border:1px solid;padding:16px;display:flex;flex-direction:column;justify-content:space-between}+ .face .row{display:flex;gap:6px}+ .dot{width:12px;height:12px;border-radius:50%}+ .bar{height:8px;border-radius:4px}+ .face .tt{font-size:12px;font-weight:bold}+ .face .st{font-size:9px}+ .face.light{background:#f4f4f2;border-color:#d9d9d6;color:#1a1a1c}+ .face.light .bar{background:#c9c9c4}.face.light .dot{background:#ff9d5c}+ .face.dark-face{background:#141418;border-color:rgba(255,255,255,.12);color:#f4f4f2;transform:rotateY(180deg)}+ .face.dark-face .bar{background:#33333a}.face.dark-face .dot{background:#cdd3ff}+ .state-label{font-size:11px;color:var(--ui-muted);text-align:center;min-height:20px}+ /* Panel */+ aside{width:clamp(200px,22vw,240px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+ .div{height:1px;background:var(--ui-border)}+ .sr{display:flex;align-items:center;gap:6px;font-size:10px}+ .sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+ .sv{width:52px;text-align:right;color:var(--ui-text)}+ select{background:var(--ui-bg);border:1px solid var(--ui-border);color:var(--ui-text);font-family:var(--mono);font-size:10px;padding:8px 6px;border-radius:4px;width:100%;min-height:44px}+ button.rst{background:transparent;border:1px solid var(--ui-border);color:var(--ui-text);font-family:var(--mono);font-size:10px;padding:14px 8px;border-radius:4px;cursor:pointer;width:100%}+ @media(hover:hover){button.rst:hover{border-color:var(--ui-accent);color:var(--ui-accent)}.toggle:hover{background:#17171b}}+ @media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:440px}}+ @media(prefers-reduced-motion:reduce){.icon line,.icon .disc,.icon .cutout,.card-inner,.toggle{transition:none!important}}+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../hamburger-menu-toggle/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../copy-to-clipboard/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/theme-toggle-morph/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Theme Toggle Morph</h1>+ <p>A sun retracts its rays and slides a mask into a crescent moon — one icon animating between light and dark.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage demo" id="demo">+ <button class="toggle" id="toggle" type="button" aria-pressed="false" aria-label="Switch to dark theme">+ <svg class="icon" viewBox="0 0 24 24" aria-hidden="true">+ <defs>+ <mask id="moon-mask">+ <rect width="24" height="24" fill="#fff"/>+ <circle class="cutout" cx="12" cy="12" r="5"/>+ </mask>+ </defs>+ <g class="rays">+ <line x1="12" y1="1" x2="12" y2="3"/>+ <line x1="12" y1="21" x2="12" y2="23"/>+ <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>+ <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>+ <line x1="1" y1="12" x2="3" y2="12"/>+ <line x1="21" y1="12" x2="23" y2="12"/>+ <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>+ <line x1="18.36" y1="4.22" x2="19.78" y2="5.64"/>+ </g>+ <circle class="disc" cx="12" cy="12" r="5" mask="url(#moon-mask)"/>+ </svg>+ </button>+ <div class="card" aria-hidden="true">+ <div class="card-inner">+ <div class="face light">+ <div><div class="tt">Light theme</div><div class="st">preview card</div></div>+ <div class="row"><span class="dot"></span><div class="bar" style="flex:1"></div></div>+ </div>+ <div class="face dark-face">+ <div><div class="tt">Dark theme</div><div class="st">preview card</div></div>+ <div class="row"><span class="dot"></span><div class="bar" style="flex:1"></div></div>+ </div>+ </div>+ </div>+ <div class="state-label" id="state-label">Light theme active</div>+ </div>+ </div>+ <aside>+ <p class="note">The sun's rays scale to zero from the center while an SVG mask circle slides across the disc, carving out a crescent. The card flips on the same clock.</p>+ <div class="lbl">Morph Duration</div>+ <div class="sr"><input type="range" id="dur-sl" min="150" max="1200" value="500" step="50"><span class="sv" id="dur-v">500ms</span></div>+ <div class="lbl">Easing</div>+ <select id="ease-sel">+ <option value="cubic-bezier(.4,0,.2,1)" selected>Standard</option>+ <option value="cubic-bezier(.34,1.56,.64,1)">Overshoot</option>+ <option value="ease-in-out">Ease in-out</option>+ <option value="linear">Linear</option>+ </select>+ <div class="lbl">Toggle Size</div>+ <div class="sr"><input type="range" id="size-sl" min="64" max="140" value="104" step="4"><span class="sv" id="size-v">104px</span></div>+ <div class="div"></div>+ <button class="rst" id="reset-btn">↺ Reset to light</button>+ </aside>+</div>+<script>+ const demo=document.getElementById('demo');+ const toggle=document.getElementById('toggle');+ const label=document.getElementById('state-label');+ const root=document.documentElement;++ function setDark(on){+ demo.classList.toggle('dark',on);+ toggle.setAttribute('aria-pressed',String(on));+ toggle.setAttribute('aria-label',on?'Switch to light theme':'Switch to dark theme');+ label.textContent=on?'Dark theme active':'Light theme active';+ }+ toggle.addEventListener('click',()=>setDark(!demo.classList.contains('dark')));+ document.getElementById('reset-btn').addEventListener('click',()=>setDark(false));++ document.getElementById('dur-sl').addEventListener('input',e=>{+ document.getElementById('dur-v').textContent=e.target.value+'ms';+ root.style.setProperty('--morph-dur',e.target.value+'ms');+ });+ document.getElementById('ease-sel').addEventListener('change',e=>{+ root.style.setProperty('--morph-ease',e.target.value);+ });+ document.getElementById('size-sl').addEventListener('input',e=>{+ document.getElementById('size-v').textContent=e.target.value+'px';+ root.style.setProperty('--toggle-size',e.target.value+'px');+ });+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/04-micro-interactions/toast-notification/README.md b/animations/04-micro-interactions/toast-notification/README.mdnew file mode 100644index 00000000..eb8c6081--- /dev/null+++ b/animations/04-micro-interactions/toast-notification/README.md@@ -0,0 +1,52 @@+# Toast Notification++## What it is+A toast is a small, transient notification card that slides into a corner of the screen, waits a few seconds, then removes itself. Toasts stack when several fire in quick succession, count down a progress bar toward their auto-dismiss, and accept an early dismiss by tap, swipe, or a close button. When one leaves, the others animate up to close the gap it left behind.++## When to use it+- Confirming a background action completed — "Saved", "Copied", "Uploaded"+- Reporting a non-blocking error the user can ignore or retry — "Failed to sync"+- Surfacing passive status the user did not explicitly ask for — "New version available"+- Any feedback that should not interrupt the task the way a modal or dialog would++## How it works+Each toast enters from the corner's edge with a `transform` (a `translateX` off-screen for slide, `scale(.85)` for scale, or opacity alone for fade), then settles to `transform: none` on the next frame. A `<span class="prog">` runs a CSS `scaleX(1) → scaleX(0)` animation for the auto-dismiss duration; its `animationend` triggers removal, so pausing the animation on `:hover` also pauses the dismissal for free.++The gap left by a departing toast is closed with **FLIP**. Before removing the node, record every surviving toast's position; after removal, apply the inverted delta as a `translateY` and let it transition back to zero — layout collapses, but only `transform` animates:++```js+const prev = new Map(toasts.map(t => [t, t.getBoundingClientRect().top]));+el.remove();+toasts.forEach(t => {+ const d = prev.get(t) - t.getBoundingClientRect().top; // First - Last+ if (!d) return;+ t.style.transition = 'none';+ t.style.transform = `translateY(${d}px)`; // Invert+ requestAnimationFrame(() => { t.style.transition=''; t.style.transform=''; }); // Play+});+```++The region is `role="status" aria-live="polite"` so each toast's text is announced without stealing focus. Swipe uses Pointer Events with `touch-action: pan-y`, so a horizontal drag past the threshold dismisses in that direction while vertical page scroll still passes through.++## Key parameters+| Parameter | Default | Effect |+|-----------|---------|--------|+| Corner | Top right | Anchor + enter direction; bottom corners use `column-reverse` so newest sits nearest the corner |+| Animation | Slide | Enter/exit transform: slide (`translateX`), fade (opacity), or scale |+| Auto-dismiss | 4.0s | Progress-bar duration; `animationend` fires the dismiss |+| Stack limit | 4 | Oldest toast is force-dismissed once the count exceeds this |+| Swipe threshold | 35% width | Horizontal drag past this (or a near-zero tap) dismisses on release |+| Reflow duration | ~250ms | FLIP `translateY` timing as the stack closes the gap |++## Production notes+- **Announce, don't trap.** Wrap the region in `aria-live="polite"` and `role="status"` so screen readers hear the message; never move focus into a toast — that is dialog behavior, not notification behavior. Errors that demand action belong in an alert, not a toast.+- **Cap the stack.** An unbounded stack buries the screen and defeats the purpose. Keep a small limit (3–5) and evict the oldest, or coalesce duplicates into a single count.+- **Pause on hover and focus.** A toast that vanishes while being read is hostile. Pausing the progress animation on `:hover`/`:focus-within` pauses the timer too when dismissal is driven by `animationend`.+- **Respect reduced motion.** Under `prefers-reduced-motion: reduce`, drop the slide/scale and the sweeping bar; appear and disappear instantly and fall back to a `setTimeout` for the auto-dismiss so the behavior survives without the animation.+- **Reflow with transforms, never layout.** Animating `top`/`height` to close the gap thrashes layout; FLIP keeps the motion on the GPU-friendly `transform`.+- **Library equivalents**: [Sonner](https://sonner.emilkowal.ski/) and `react-hot-toast` provide stacking, swipe, and pause-on-hover out of the box; Radix Toast supplies the accessible primitives (live region, swipe, timers) for a custom skin.++## See also+- [Drawer Slide](../drawer-slide/) — a larger corner-anchored panel driven by the same off-screen translate+- [Modal Expand](../modal-expand/) — the interrupting counterpart for feedback that must block+- [Success Confetti](../success-confetti/) — a celebratory companion to a "success" toastdiff --git a/animations/04-micro-interactions/toast-notification/index.html b/animations/04-micro-interactions/toast-notification/index.htmlnew file mode 100644index 00000000..04eb914c--- /dev/null+++ b/animations/04-micro-interactions/toast-notification/index.html@@ -0,0 +1,220 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Toast Notification — Animation Handbook</title>+ <meta name="description" content="Transient cards slide into a corner, stack, count down a progress bar, then auto-dismiss as the rest reflow to close the gap.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/toast-notification/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Toast Notification — Animation Handbook">+ <meta property="og:description" content="Transient cards slide into a corner, stack, count down a progress bar, then auto-dismiss as the rest reflow to close the gap.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/toast-notification/">+ <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="Toast Notification — Animation Handbook">+ <meta name="twitter:description" content="Transient cards slide into a corner, stack, count down a progress bar, then auto-dismiss as the rest reflow to close the gap.">+ <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": "Toast Notification", "name": "Toast Notification", "description": "Transient cards slide into a corner, stack, count down a progress bar, then auto-dismiss as the rest reflow to close the gap.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/toast-notification/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Toast Notification"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff9d5c;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--ok:#5ad19a;--err:#f4515b;--info:#6ea8ff}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(11px,1.8vw,15px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ .stage{position:relative;overflow:hidden;min-height:min(62vh,480px);border:1px solid var(--ui-border);border-radius:8px;background:radial-gradient(120% 100% at 50% 0,#141418,#0b0b0d)}+ .hint{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:11px;color:var(--ui-muted);text-align:center;pointer-events:none;padding:0 16px}+ /* Toast region — anchored to a corner of the stage */+ .toaster{position:absolute;display:flex;flex-direction:column;gap:10px;width:min(300px,calc(100% - 24px));padding:12px;z-index:2}+ .toaster.tl{top:0;left:0;align-items:flex-start}+ .toaster.tr{top:0;right:0;align-items:flex-end}+ .toaster.bl{bottom:0;left:0;flex-direction:column-reverse;align-items:flex-start}+ .toaster.br{bottom:0;right:0;flex-direction:column-reverse;align-items:flex-end}+ .toast{position:relative;width:100%;overflow:hidden;border:1px solid var(--ui-border);border-left:3px solid var(--tc,var(--info));border-radius:8px;background:var(--ui-bg);padding:12px 38px 12px 12px;display:flex;gap:10px;box-shadow:0 8px 24px rgba(0,0,0,.4);cursor:grab;touch-action:pan-y;-webkit-user-select:none;user-select:none;transition:transform .34s cubic-bezier(.22,1,.36,1),opacity .34s;will-change:transform,opacity}+ .toast.ok{--tc:var(--ok)} .toast.err{--tc:var(--err)} .toast.info{--tc:var(--info)}+ .toast .ic{flex-shrink:0;width:22px;height:22px;border-radius:50%;background:var(--tc);color:#0b0b0d;font-family:var(--disp);font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;line-height:1}+ .toast .body{min-width:0}+ .toast .ti{font-family:var(--disp);font-weight:700;font-size:12px;letter-spacing:-.01em}+ .toast .ms{font-size:10.5px;color:var(--ui-muted);margin-top:2px;line-height:1.4}+ .toast .x{position:absolute;top:6px;right:6px;width:26px;height:26px;border:0;background:transparent;color:var(--ui-muted);font-size:15px;cursor:pointer;border-radius:6px;line-height:1}+ @media(hover:hover){.toast .x:hover{color:var(--ui-text);background:rgba(255,255,255,.06)}}+ .toast .prog{position:absolute;left:0;bottom:0;height:2px;width:100%;background:var(--tc);transform-origin:left;transform:scaleX(1);animation:ah_prog var(--dur,4s) linear forwards}+ @media(hover:hover){.toast:hover .prog{animation-play-state:paused}}+ .toast.paused .prog{animation-play-state:paused}+ @keyframes ah_prog{from{transform:scaleX(1)}to{transform:scaleX(0)}}+ /* controls */+ aside{width:clamp(210px,24vw,250px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:12px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+ .row{display:flex;flex-direction:column;gap:6px}+ select{width:100%;min-height:44px;background:var(--bg);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:6px;font-family:var(--mono);font-size:11px;padding:0 8px}+ .sr{display:flex;align-items:center;gap:8px;font-size:10px}+ .sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+ .sval{width:46px;text-align:right;color:var(--ui-text)}+ .trigger{background:var(--ui-accent);border:0;color:#1a0f08;font-family:var(--disp);font-weight:700;font-size:12px;padding:14px 8px;border-radius:6px;cursor:pointer;width:100%;min-height:44px}+ .clear{background:transparent;border:1px solid var(--ui-border);color:var(--ui-text);font-family:var(--mono);font-size:10px;padding:12px 8px;border-radius:6px;cursor:pointer;width:100%;min-height:44px}+ @media(hover:hover){.trigger:hover{filter:brightness(1.08)}.clear:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}+ .div{height:1px;background:var(--ui-border)}+ @media(max-width:600px){.layout{flex-direction:column}aside{width:100%}}+ @media(prefers-reduced-motion:reduce){.toast{transition:none!important}.toast .prog{animation:none!important;transform:scaleX(0)}}+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../star-rating/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../segmented-control/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/toast-notification/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Toast Notification</h1>+ <p>Transient cards slide into a corner, stack, count down a progress bar, then auto-dismiss as the rest reflow to close the gap.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage">+ <div class="hint" id="hint">Trigger a toast →</div>+ <div class="toaster tr" id="toaster" role="status" aria-live="polite" aria-atomic="false"></div>+ </div>+ </div>+ <aside>+ <p class="note">Each toast auto-dismisses when its progress bar empties. Hover (or drag) to pause the countdown; tap, swipe, or press × to dismiss early.</p>+ <div class="row"><span class="lbl">Corner</span>+ <select id="corner">+ <option value="tr" selected>Top right</option>+ <option value="tl">Top left</option>+ <option value="br">Bottom right</option>+ <option value="bl">Bottom left</option>+ </select>+ </div>+ <div class="row"><span class="lbl">Animation</span>+ <select id="style">+ <option value="slide" selected>Slide</option>+ <option value="fade">Fade</option>+ <option value="scale">Scale</option>+ </select>+ </div>+ <div class="row"><span class="lbl">Auto-dismiss</span>+ <div class="sr"><input type="range" id="dur" min="2" max="8" step="0.5" value="4"><span class="sval" id="durv">4.0s</span></div>+ </div>+ <div class="row"><span class="lbl">Stack limit</span>+ <div class="sr"><input type="range" id="limit" min="1" max="6" step="1" value="4"><span class="sval" id="limitv">4</span></div>+ </div>+ <button class="trigger" id="trigger">Trigger toast</button>+ <div class="div"></div>+ <button class="clear" id="clear">Dismiss all</button>+ </aside>+</div>+<script>+ const toaster=document.getElementById('toaster'), hint=document.getElementById('hint');+ const reduce=matchMedia('(prefers-reduced-motion:reduce)').matches;+ let corner='tr', style='slide', dur=4, limit=4, toasts=[], n=0;++ const TYPES=[+ ['ok','Saved','Your changes were published.'],+ ['ok','Uploaded','profile.png finished uploading.'],+ ['err','Failed','Could not reach the server.'],+ ['err','Rejected','Card was declined — try another.'],+ ['info','Heads up','A new version is available.'],+ ['info','Synced','3 items synced across devices.']+ ];+ const ICON={ok:'✓',err:'✕',info:'i'};+ const signX=()=>corner.endsWith('r')?1:-1;++ // Enter/exit transforms per animation style+ function tf(state){+ if(style==='fade')return state==='rest'?'none':'none';+ if(style==='scale')return state==='rest'?'none':'scale(.85)';+ return state==='rest'?'none':`translateX(${signX()*112}%)`; // slide+ }+ function offscreen(el,dir){+ el.style.opacity='0';+ el.style.transform=style==='scale'?'scale(.85)':style==='fade'?'none':`translateX(${(dir||signX())*112}%)`;+ }++ // FLIP: measure remaining toasts' tops, then animate the delta with transform+ const snap=()=>{const m=new Map();toasts.forEach(t=>m.set(t,t.getBoundingClientRect().top));return m;};+ function play(prev){+ if(reduce)return;+ toasts.forEach(t=>{+ const o=prev.get(t); if(o==null)return;+ const d=o-t.getBoundingClientRect().top; if(!d)return;+ t.style.transition='none'; t.style.transform=`translateY(${d}px)`;+ requestAnimationFrame(()=>{t.style.transition='';t.style.transform='';});+ });+ }++ function spawn(){+ const [type,title,msg]=TYPES[Math.floor(Math.random()*TYPES.length)];+ const el=document.createElement('div');+ el.className='toast '+type;+ el.style.setProperty('--dur',dur+'s');+ el.innerHTML=`<span class="ic">${ICON[type]}</span>`++ `<div class="body"><div class="ti">${title}</div><div class="ms">${msg}</div></div>`++ `<button class="x" aria-label="Dismiss">×</button><span class="prog"></span>`;+ // enter: start off, then settle to rest next frame+ el.style.opacity='0'; el.style.transform=tf('enter');+ const top=corner.startsWith('t');+ top?toaster.appendChild(el):toaster.insertBefore(el,toaster.firstChild);+ toasts.push(el); wire(el,type);+ if(!reduce)requestAnimationFrame(()=>{el.style.opacity='1';el.style.transform='none';});+ else{el.style.opacity='1';el.style.transform='none';}+ if(reduce)el._to=setTimeout(()=>dismiss(el),dur*1000);+ enforce(); hint.style.display='none';+ }++ function enforce(){ while(toasts.filter(t=>!t._gone).length>limit)dismiss(toasts.find(t=>!t._gone)); }++ function dismiss(el,dir,now){+ if(!el||el._gone)return; el._gone=true;+ const i=toasts.indexOf(el); if(i>-1)toasts.splice(i,1);+ clearTimeout(el._to);+ const close=()=>{const prev=snap();el.remove();play(prev);if(!toasts.length)hint.style.display='';};+ if(reduce||now){el.remove();if(!toasts.length)hint.style.display='';return;}+ el.style.transition='transform .3s cubic-bezier(.4,0,1,1),opacity .3s';+ offscreen(el,dir);+ setTimeout(close,300);+ }++ function wire(el,type){+ const prog=el.querySelector('.prog');+ prog.addEventListener('animationend',e=>{if(e.animationName==='ah_prog')dismiss(el);});+ el.querySelector('.x').addEventListener('click',e=>{e.stopPropagation();dismiss(el);});+ // swipe / tap dismiss+ let x0=0,dx=0,drag=false;+ el.addEventListener('pointerdown',e=>{if(e.target.closest('.x'))return;drag=true;dx=0;x0=e.clientX;el.classList.add('paused');el.style.transition='none';el.setPointerCapture(e.pointerId);});+ el.addEventListener('pointermove',e=>{if(!drag)return;dx=e.clientX-x0;el.style.transform=`translateX(${dx}px)`;el.style.opacity=String(Math.max(.3,1-Math.abs(dx)/(el.offsetWidth*.8)));});+ function up(){if(!drag)return;drag=false;el.classList.remove('paused');+ if(Math.abs(dx)>el.offsetWidth*.35||Math.abs(dx)<6){dismiss(el,dx<0?-1:1);}+ else{el.style.transition='transform .3s cubic-bezier(.22,1,.36,1),opacity .3s';el.style.transform='none';el.style.opacity='1';}}+ el.addEventListener('pointerup',up); el.addEventListener('pointercancel',up);+ }++ // controls+ document.getElementById('trigger').addEventListener('click',spawn);+ document.getElementById('clear').addEventListener('click',()=>{[...toasts].forEach(t=>dismiss(t));});+ document.getElementById('corner').addEventListener('change',e=>{corner=e.target.value;toaster.className='toaster '+corner;});+ document.getElementById('style').addEventListener('change',e=>style=e.target.value);+ document.getElementById('dur').addEventListener('input',e=>{dur=+e.target.value;document.getElementById('durv').textContent=dur.toFixed(1)+'s';});+ document.getElementById('limit').addEventListener('input',e=>{limit=+e.target.value;document.getElementById('limitv').textContent=limit;enforce();});+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/04-micro-interactions/toggle-switch/index.html b/animations/04-micro-interactions/toggle-switch/index.htmlindex 8275a724..e6ef5528 100644--- a/animations/04-micro-interactions/toggle-switch/index.html+++ b/animations/04-micro-interactions/toggle-switch/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Toggle / Switch Slide</title>+ <title>Toggle / Switch Slide — Animation Handbook</title>+ <meta name="description" content="Pill slides left/right for on/off — smooth cubic-bezier gives a weighted, physical feel.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/toggle-switch/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Toggle / Switch Slide — Animation Handbook">+ <meta property="og:description" content="Pill slides left/right for on/off — smooth cubic-bezier gives a weighted, physical feel.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/toggle-switch/">+ <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="Toggle / Switch Slide — Animation Handbook">+ <meta name="twitter:description" content="Pill slides left/right for on/off — smooth cubic-bezier gives a weighted, physical feel.">+ <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": "Toggle / Switch Slide", "name": "Toggle / Switch Slide", "description": "Pill slides left/right for on/off — smooth cubic-bezier gives a weighted, physical feel.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/toggle-switch/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Toggle / Switch Slide"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -54,8 +68,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px}}@media(prefers-reduced-motion:reduce){.sw-track,.sw-thumb{transition:background .1s!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../magnetic-button/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../heart-burst/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/toggle-switch/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Toggle / Switch Slide</h1><p>Pill slides left/right for on/off — smooth cubic-bezier gives a weighted, physical feel.</p>@@ -136,5 +164,6 @@}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/04-micro-interactions/tooltip-reveal/index.html b/animations/04-micro-interactions/tooltip-reveal/index.htmlindex dbcd4384..6c6b153c 100644--- a/animations/04-micro-interactions/tooltip-reveal/index.html+++ b/animations/04-micro-interactions/tooltip-reveal/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Tooltip Reveal</title>+ <title>Tooltip Reveal — Animation Handbook</title>+ <meta name="description" content="Info box fades in after a 300ms delay — long enough to avoid triggering on mouse pass-through.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/tooltip-reveal/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Tooltip Reveal — Animation Handbook">+ <meta property="og:description" content="Info box fades in after a 300ms delay — long enough to avoid triggering on mouse pass-through.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/tooltip-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="Tooltip Reveal — Animation Handbook">+ <meta name="twitter:description" content="Info box fades in after a 300ms delay — long enough to avoid triggering on mouse pass-through.">+ <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": "Tooltip Reveal", "name": "Tooltip Reveal", "description": "Info box fades in after a 300ms delay — long enough to avoid triggering on mouse pass-through.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/tooltip-reveal/", "inLanguage": "en", "articleSection": "Micro-Interactions", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Micro-Interactions, Tooltip Reveal"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -58,8 +72,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:480px}}@media(prefers-reduced-motion:reduce){.tooltip{transition:opacity var(--tip-dur) ease!important;transform:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../badge-pulse/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../drawer-slide/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/04-micro-interactions/tooltip-reveal/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Tooltip Reveal</h1><p>Info box fades in after a 300ms delay — long enough to avoid triggering on mouse pass-through.</p>@@ -134,5 +162,6 @@wraps.forEach(w=>w.classList.toggle('has-arrow',e.target.checked));});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/enter-exit-typography/index.html b/animations/05-text-typography/enter-exit-typography/index.htmlindex 9668829e..98ef72d7 100644--- a/animations/05-text-typography/enter-exit-typography/index.html+++ b/animations/05-text-typography/enter-exit-typography/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Enter/Exit Typography</title>+ <title>Enter/Exit Typography — Animation Handbook</title>+ <meta name="description" content="Three-act phrase lifecycle: enter → hold → exit. Each phrase has its own choreography pair.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/enter-exit-typography/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Enter/Exit Typography — Animation Handbook">+ <meta property="og:description" content="Three-act phrase lifecycle: enter → hold → exit. Each phrase has its own choreography pair.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/enter-exit-typography/">+ <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="Enter/Exit Typography — Animation Handbook">+ <meta name="twitter:description" content="Three-act phrase lifecycle: enter → hold → exit. Each phrase has its own choreography pair.">+ <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": "Enter/Exit Typography", "name": "Enter/Exit Typography", "description": "Three-act phrase lifecycle: enter → hold → exit. Each phrase has its own choreography pair.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/enter-exit-typography/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Enter/Exit Typography"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -68,8 +82,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:480px}.stage{flex:none}}@media(prefers-reduced-motion:reduce){.phrase-el{animation:none!important;opacity:1!important;transform:none!important;filter:none!important;clip-path:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../outline-to-fill/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../rotate-word-carousel/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/enter-exit-typography/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Enter/Exit Typography</h1><p>Three-act phrase lifecycle: enter → hold → exit. Each phrase has its own choreography pair.</p>@@ -182,5 +210,6 @@ document.getElementById('exit-sl').addEventListener('input',e=>{start();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/glitch-text/index.html b/animations/05-text-typography/glitch-text/index.htmlindex 9da28a0f..966c5708 100644--- a/animations/05-text-typography/glitch-text/index.html+++ b/animations/05-text-typography/glitch-text/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Glitch Text</title>+ <title>Glitch Text — Animation Handbook</title>+ <meta name="description" content="Two color-split copies of a headline are sliced by animated clip-path bands that jump on a jittery timeline.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/glitch-text/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Glitch Text — Animation Handbook">+ <meta property="og:description" content="Two color-split copies of a headline are sliced by animated clip-path bands that jump on a jittery timeline.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/glitch-text/">+ <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="Glitch Text — Animation Handbook">+ <meta name="twitter:description" content="Two color-split copies of a headline are sliced by animated clip-path bands that jump on a jittery timeline.">+ <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": "Glitch Text", "name": "Glitch Text", "description": "Two color-split copies of a headline are sliced by animated clip-path bands that jump on a jittery timeline.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/glitch-text/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Glitch Text"}</script><style>:root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff6f8b;@@ -63,8 +77,22 @@.glitch::before,.glitch::after{animation:none!important;clip-path:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../rotate-word-carousel/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../text-on-path/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/glitch-text/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Glitch Text</h1><p>Two color-split copies of a headline are sliced by animated clip-path bands that jump on a jittery timeline.</p>@@ -134,5 +162,6 @@ document.getElementById('hover-ck').addEventListener('change',e=>{});if(!reduce)reslice();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/kinetic-typography/index.html b/animations/05-text-typography/kinetic-typography/index.htmlindex 1fea450d..75366ff1 100644--- a/animations/05-text-typography/kinetic-typography/index.html+++ b/animations/05-text-typography/kinetic-typography/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Kinetic Typography</title>+ <title>Kinetic Typography — Animation Handbook</title>+ <meta name="description" content="Text in motion — phrases enter, transform, and exit in a coordinated timeline.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/kinetic-typography/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Kinetic Typography — Animation Handbook">+ <meta property="og:description" content="Text in motion — phrases enter, transform, and exit in a coordinated timeline.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/kinetic-typography/">+ <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="Kinetic Typography — Animation Handbook">+ <meta name="twitter:description" content="Text in motion — phrases enter, transform, and exit in a coordinated timeline.">+ <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": "Kinetic Typography", "name": "Kinetic Typography", "description": "Text in motion — phrases enter, transform, and exit in a coordinated timeline.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/kinetic-typography/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Kinetic Typography"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -63,8 +77,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:420px}.stage{flex:none}}@media(prefers-reduced-motion:reduce){.kw{animation:none!important;opacity:1!important;transform:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../typewriter-effect/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/kinetic-typography/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Kinetic Typography</h1><p>Text in motion — phrases enter, transform, and exit in a coordinated timeline.</p>@@ -179,5 +207,6 @@ document.getElementById('beat-tog').addEventListener('change',e=>{run();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/marquee-ticker/index.html b/animations/05-text-typography/marquee-ticker/index.htmlindex 139aab56..6e58a7aa 100644--- a/animations/05-text-typography/marquee-ticker/index.html+++ b/animations/05-text-typography/marquee-ticker/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Marquee / Ticker</title>+ <title>Marquee / Ticker — Animation Handbook</title>+ <meta name="description" content="Continuous horizontal scroll with duplicated content — the seam is invisible at the loop point.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/marquee-ticker/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Marquee / Ticker — Animation Handbook">+ <meta property="og:description" content="Continuous horizontal scroll with duplicated content — the seam is invisible at the loop point.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/marquee-ticker/">+ <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="Marquee / Ticker — Animation Handbook">+ <meta name="twitter:description" content="Continuous horizontal scroll with duplicated content — the seam is invisible at the loop point.">+ <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": "Marquee / Ticker", "name": "Marquee / Ticker", "description": "Continuous horizontal scroll with duplicated content — the seam is invisible at the loop point.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/marquee-ticker/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Marquee / Ticker"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -48,8 +62,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:380px}}@media(prefers-reduced-motion:reduce){.marq-track{animation-play-state:paused!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../text-clip-path-reveal/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../text-morphing/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/marquee-ticker/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Marquee / Ticker</h1><p>Continuous horizontal scroll with duplicated content — the seam is invisible at the loop point.</p>@@ -140,5 +168,6 @@rebuild();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/outline-to-fill/index.html b/animations/05-text-typography/outline-to-fill/index.htmlindex 22c783f0..ef76cc6c 100644--- a/animations/05-text-typography/outline-to-fill/index.html+++ b/animations/05-text-typography/outline-to-fill/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Outline to Fill</title>+ <title>Outline to Fill — Animation Handbook</title>+ <meta name="description" content="Text starts as a hollow stroke then fills with color — two techniques: clip-path reveal and opacity crossfade.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/outline-to-fill/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Outline to Fill — Animation Handbook">+ <meta property="og:description" content="Text starts as a hollow stroke then fills with color — two techniques: clip-path reveal and opacity crossfade.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/outline-to-fill/">+ <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="Outline to Fill — Animation Handbook">+ <meta name="twitter:description" content="Text starts as a hollow stroke then fills with color — two techniques: clip-path reveal and opacity crossfade.">+ <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": "Outline to Fill", "name": "Outline to Fill", "description": "Text starts as a hollow stroke then fills with color — two techniques: clip-path reveal and opacity crossfade.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/outline-to-fill/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Outline to Fill"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -83,8 +97,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:440px}}@media(prefers-reduced-motion:reduce){.fill-layer,.stroke-only,.fill-only{transition:none!important}.fill-layer{clip-path:inset(0%)!important}.stroke-fade-wrap.filled .fill-only{opacity:1!important}.stroke-fade-wrap.filled .stroke-only{opacity:0!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../text-gradient-animation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../enter-exit-typography/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/outline-to-fill/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Outline to Fill</h1><p>Text starts as a hollow stroke then fills with color — two techniques: clip-path reveal and opacity crossfade.</p>@@ -201,5 +229,6 @@play();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/rotate-word-carousel/index.html b/animations/05-text-typography/rotate-word-carousel/index.htmlindex f5127c59..e7063bbb 100644--- a/animations/05-text-typography/rotate-word-carousel/index.html+++ b/animations/05-text-typography/rotate-word-carousel/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Rotate Word Carousel</title>+ <title>Rotate Word Carousel — Animation Handbook</title>+ <meta name="description" content="One word cycles through a list while the sentence stays static — the classic hero pattern.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/rotate-word-carousel/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Rotate Word Carousel — Animation Handbook">+ <meta property="og:description" content="One word cycles through a list while the sentence stays static — the classic hero pattern.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/rotate-word-carousel/">+ <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="Rotate Word Carousel — Animation Handbook">+ <meta name="twitter:description" content="One word cycles through a list while the sentence stays static — the classic hero pattern.">+ <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": "Rotate Word Carousel", "name": "Rotate Word Carousel", "description": "One word cycles through a list while the sentence stays static — the classic hero pattern.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/rotate-word-carousel/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Rotate Word Carousel"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -63,8 +77,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:380px}}@media(prefers-reduced-motion:reduce){.rot-word{transition:none!important;transform:none!important;opacity:1!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../enter-exit-typography/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../glitch-text/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/rotate-word-carousel/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Rotate Word Carousel</h1><p>One word cycles through a list while the sentence stays static — the classic hero pattern.</p>@@ -186,5 +214,6 @@ Startups</textarea>rotWord.setAttribute('aria-live','polite');start();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/scramble-text/index.html b/animations/05-text-typography/scramble-text/index.htmlindex d3261dd9..3fa3d618 100644--- a/animations/05-text-typography/scramble-text/index.html+++ b/animations/05-text-typography/scramble-text/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Scramble / Glitch Text</title>+ <title>Scramble / Glitch Text — Animation Handbook</title>+ <meta name="description" content="Characters cycle through random symbols before locking to their true value — decryption aesthetic.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/scramble-text/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Scramble / Glitch Text — Animation Handbook">+ <meta property="og:description" content="Characters cycle through random symbols before locking to their true value — decryption aesthetic.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/scramble-text/">+ <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="Scramble / Glitch Text — Animation Handbook">+ <meta name="twitter:description" content="Characters cycle through random symbols before locking to their true value — decryption aesthetic.">+ <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": "Scramble / Glitch Text", "name": "Scramble / Glitch Text", "description": "Characters cycle through random symbols before locking to their true value — decryption aesthetic.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/scramble-text/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Scramble / Glitch Text"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -45,8 +59,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:360px}}@media(prefers-reduced-motion:reduce){.scramble-text .char{transition:none!important;color:#fff!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../typewriter-effect/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../variable-font-morph/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/scramble-text/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Scramble / Glitch Text</h1><p>Characters cycle through random symbols before locking to their true value — decryption aesthetic.</p>@@ -157,5 +185,6 @@ document.getElementById('text-inp').addEventListener('keydown',e=>{if(e.key==='Escramble();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/text-clip-path-reveal/index.html b/animations/05-text-typography/text-clip-path-reveal/index.htmlindex 3e4aef2f..111e0595 100644--- a/animations/05-text-typography/text-clip-path-reveal/index.html+++ b/animations/05-text-typography/text-clip-path-reveal/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Text Clip-Path Reveal</title>+ <title>Text Clip-Path Reveal — Animation Handbook</title>+ <meta name="description" content="Headline reveals line-by-line via an expanding clip-path mask — preserves kerning and spacing perfectly.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-clip-path-reveal/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Text Clip-Path Reveal — Animation Handbook">+ <meta property="og:description" content="Headline reveals line-by-line via an expanding clip-path mask — preserves kerning and spacing perfectly.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-clip-path-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="Text Clip-Path Reveal — Animation Handbook">+ <meta name="twitter:description" content="Headline reveals line-by-line via an expanding clip-path mask — preserves kerning and spacing perfectly.">+ <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": "Text Clip-Path Reveal", "name": "Text Clip-Path Reveal", "description": "Headline reveals line-by-line via an expanding clip-path mask — preserves kerning and spacing perfectly.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-clip-path-reveal/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Text Clip-Path Reveal"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -50,8 +64,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:360px}}@media(prefers-reduced-motion:reduce){.line-text{clip-path:inset(0)!important;transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../variable-font-morph/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../marquee-ticker/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/text-clip-path-reveal/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Text Clip-Path Reveal</h1><p>Headline reveals line-by-line via an expanding clip-path mask — preserves kerning and spacing perfectly.</p>@@ -141,5 +169,6 @@ Always.</textarea>reveal();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/text-gradient-animation/index.html b/animations/05-text-typography/text-gradient-animation/index.htmlindex 59470d9d..a298f694 100644--- a/animations/05-text-typography/text-gradient-animation/index.html+++ b/animations/05-text-typography/text-gradient-animation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Text Gradient Animation</title>+ <title>Text Gradient Animation — Animation Handbook</title>+ <meta name="description" content="background-clip: text + animated background-position flows color through the characters.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-gradient-animation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Text Gradient Animation — Animation Handbook">+ <meta property="og:description" content="background-clip: text + animated background-position flows color through the characters.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-gradient-animation/">+ <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="Text Gradient Animation — Animation Handbook">+ <meta name="twitter:description" content="background-clip: text + animated background-position flows color through the characters.">+ <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": "Text Gradient Animation", "name": "Text Gradient Animation", "description": "background-clip: text + animated background-position flows color through the characters.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-gradient-animation/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Text Gradient Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -64,8 +78,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:400px}:root{--grad-size:64px}}@media(prefers-reduced-motion:reduce){.grad-text{animation:none!important;background-position:0% 50%!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../text-morphing/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../outline-to-fill/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/text-gradient-animation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Text Gradient Animation</h1><p>background-clip: text + animated background-position flows color through the characters.</p>@@ -128,5 +156,6 @@document.documentElement.style.setProperty('--c2',e.target.value);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/text-morphing/index.html b/animations/05-text-typography/text-morphing/index.htmlindex b56caccf..885d9b54 100644--- a/animations/05-text-typography/text-morphing/index.html+++ b/animations/05-text-typography/text-morphing/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Text Morphing</title>+ <title>Text Morphing — Animation Handbook</title>+ <meta name="description" content="One word transitions into another character-by-character — each letter slides out as the next slides in.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-morphing/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Text Morphing — Animation Handbook">+ <meta property="og:description" content="One word transitions into another character-by-character — each letter slides out as the next slides in.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-morphing/">+ <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="Text Morphing — Animation Handbook">+ <meta name="twitter:description" content="One word transitions into another character-by-character — each letter slides out as the next slides in.">+ <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": "Text Morphing", "name": "Text Morphing", "description": "One word transitions into another character-by-character — each letter slides out as the next slides in.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-morphing/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Text Morphing"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -60,8 +74,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:400px}}@media(prefers-reduced-motion:reduce){.morph-char{transition:none!important;transform:none!important;opacity:1!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../marquee-ticker/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../text-gradient-animation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/text-morphing/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Text Morphing</h1><p>One word transitions into another character-by-character — each letter slides out as the next slides in.</p>@@ -200,5 +228,6 @@ SOUND</textarea>start();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/text-on-path/index.html b/animations/05-text-typography/text-on-path/index.htmlindex 56939d86..b11c073d 100644--- a/animations/05-text-typography/text-on-path/index.html+++ b/animations/05-text-typography/text-on-path/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Text on a Path</title>+ <title>Text on a Path — Animation Handbook</title>+ <meta name="description" content="An SVG textPath binds a string to a curve, and animating startOffset scrolls the text along it.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-on-path/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Text on a Path — Animation Handbook">+ <meta property="og:description" content="An SVG textPath binds a string to a curve, and animating startOffset scrolls the text along it.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-on-path/">+ <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="Text on a Path — Animation Handbook">+ <meta name="twitter:description" content="An SVG textPath binds a string to a curve, and animating startOffset scrolls the text along it.">+ <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": "Text on a Path", "name": "Text on a Path", "description": "An SVG textPath binds a string to a curve, and animating startOffset scrolls the text along it.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-on-path/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Text on a Path"}</script><style>:root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff6f8b;@@ -40,8 +54,22 @@.div{height:1px;background:var(--ui-border)}@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:340px}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../glitch-text/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../wavy-text/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/text-on-path/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Text on a Path</h1><p>An SVG textPath binds a string to a curve, and animating startOffset scrolls the text along it.</p>@@ -112,5 +140,6 @@ document.querySelectorAll('#shape button').forEach(b=>{});start();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/typewriter-effect/index.html b/animations/05-text-typography/typewriter-effect/index.htmlindex 1609267f..492eddf8 100644--- a/animations/05-text-typography/typewriter-effect/index.html+++ b/animations/05-text-typography/typewriter-effect/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Typewriter Effect</title>+ <title>Typewriter Effect — Animation Handbook</title>+ <meta name="description" content="Characters appear one at a time with a blinking cursor — natural variance makes it feel human.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/typewriter-effect/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Typewriter Effect — Animation Handbook">+ <meta property="og:description" content="Characters appear one at a time with a blinking cursor — natural variance makes it feel human.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/typewriter-effect/">+ <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="Typewriter Effect — Animation Handbook">+ <meta name="twitter:description" content="Characters appear one at a time with a blinking cursor — natural variance makes it feel human.">+ <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": "Typewriter Effect", "name": "Typewriter Effect", "description": "Characters appear one at a time with a blinking cursor — natural variance makes it feel human.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/typewriter-effect/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Typewriter Effect"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -47,8 +61,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:360px}}@media(prefers-reduced-motion:reduce){.cursor{animation:none!important;opacity:1!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../kinetic-typography/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../scramble-text/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/typewriter-effect/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Typewriter Effect</h1><p>Characters appear one at a time with a blinking cursor — natural variance makes it feel human.</p>@@ -180,5 +208,6 @@start();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/variable-font-morph/index.html b/animations/05-text-typography/variable-font-morph/index.htmlindex 0b3592f4..38b1f492 100644--- a/animations/05-text-typography/variable-font-morph/index.html+++ b/animations/05-text-typography/variable-font-morph/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Variable Font Morph</title>+ <title>Variable Font Morph — Animation Handbook</title>+ <meta name="description" content="CSS font-variation-settings transitions between weight, slant, and casual axes of a variable font.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/variable-font-morph/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Variable Font Morph — Animation Handbook">+ <meta property="og:description" content="CSS font-variation-settings transitions between weight, slant, and casual axes of a variable font.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/variable-font-morph/">+ <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="Variable Font Morph — Animation Handbook">+ <meta name="twitter:description" content="CSS font-variation-settings transitions between weight, slant, and casual axes of a variable font.">+ <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": "Variable Font Morph", "name": "Variable Font Morph", "description": "CSS font-variation-settings transitions between weight, slant, and casual axes of a variable font.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/variable-font-morph/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Variable Font Morph"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -59,8 +73,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px}}@media(prefers-reduced-motion:reduce){.vf-text{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../scramble-text/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../text-clip-path-reveal/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/variable-font-morph/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Variable Font Morph</h1><p>CSS font-variation-settings transitions between weight, slant, and casual axes of a variable font.</p>@@ -158,5 +186,6 @@ document.getElementById('auto-btn').addEventListener('click',()=>{step();autoTimer=setInterval(step,1400);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/05-text-typography/wavy-text/index.html b/animations/05-text-typography/wavy-text/index.htmlindex fc6d1c17..e9374453 100644--- a/animations/05-text-typography/wavy-text/index.html+++ b/animations/05-text-typography/wavy-text/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Wavy Text</title>+ <title>Wavy Text — Animation Handbook</title>+ <meta name="description" content="Each letter is its own span with a staggered animation-delay, so a vertical sine wave travels across the word.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/wavy-text/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Wavy Text — Animation Handbook">+ <meta property="og:description" content="Each letter is its own span with a staggered animation-delay, so a vertical sine wave travels across the word.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/wavy-text/">+ <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="Wavy Text — Animation Handbook">+ <meta name="twitter:description" content="Each letter is its own span with a staggered animation-delay, so a vertical sine wave travels across the word.">+ <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": "Wavy Text", "name": "Wavy Text", "description": "Each letter is its own span with a staggered animation-delay, so a vertical sine wave travels across the word.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/wavy-text/", "inLanguage": "en", "articleSection": "Text & Typography", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Text & Typography, Wavy Text"}</script><style>:root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff6f8b;@@ -43,8 +57,22 @@.wave-text span{animation:none!important;transform:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../text-on-path/" rel="prev" title="Previous">‹ Prev</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/05-text-typography/wavy-text/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Wavy Text</h1><p>Each letter is its own span with a staggered animation-delay, so a vertical sine wave travels across the word.</p>@@ -98,5 +126,6 @@ document.getElementById('stg-sl').addEventListener('input',e=>{document.getElementById('stg-sv').textContent=e.target.value+'ms';});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/2-5d-pseudo-3d/index.html b/animations/06-3d-advanced/2-5d-pseudo-3d/index.htmlindex 7c0da137..a97fae66 100644--- a/animations/06-3d-advanced/2-5d-pseudo-3d/index.html+++ b/animations/06-3d-advanced/2-5d-pseudo-3d/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>2.5D / Pseudo-3D</title>+ <title>2.5D / Pseudo-3D — Animation Handbook</title>+ <meta name="description" content="Flat 2D layers at different CSS translateZ depths — mouse movement parallaxes each at a different rate.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/2-5d-pseudo-3d/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="2.5D / Pseudo-3D — Animation Handbook">+ <meta property="og:description" content="Flat 2D layers at different CSS translateZ depths — mouse movement parallaxes each at a different rate.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/2-5d-pseudo-3d/">+ <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="2.5D / Pseudo-3D — Animation Handbook">+ <meta name="twitter:description" content="Flat 2D layers at different CSS translateZ depths — mouse movement parallaxes each at a different rate.">+ <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": "2.5D / Pseudo-3D", "name": "2.5D / Pseudo-3D", "description": "Flat 2D layers at different CSS translateZ depths — mouse movement parallaxes each at a different rate.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/2-5d-pseudo-3d/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, 2.5D / Pseudo-3D"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -66,8 +80,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:420px}.stage{flex:none}}@media(prefers-reduced-motion:reduce){.scene-inner{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../chromatic-aberration/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../ray-marching-sdf/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/2-5d-pseudo-3d/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>2.5D / Pseudo-3D</h1><p>Flat 2D layers at different CSS translateZ depths — mouse movement parallaxes each at a different rate.</p>@@ -216,5 +244,6 @@ document.getElementById('reset-btn').addEventListener('click',()=>{applyParallax// Hide labels by defaultdocument.querySelectorAll('.depth-label').forEach(d=>d.style.display='none');</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/3d-model-orbit/index.html b/animations/06-3d-advanced/3d-model-orbit/index.htmlindex 2101449e..94538284 100644--- a/animations/06-3d-advanced/3d-model-orbit/index.html+++ b/animations/06-3d-advanced/3d-model-orbit/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>3D Model Orbit</title>+ <title>3D Model Orbit — Animation Handbook</title>+ <meta name="description" content="Phong-shaded 3D geometry in vanilla WebGL — vertex buffers, MVP matrix, and a full lighting model.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/3d-model-orbit/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="3D Model Orbit — Animation Handbook">+ <meta property="og:description" content="Phong-shaded 3D geometry in vanilla WebGL — vertex buffers, MVP matrix, and a full lighting model.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/3d-model-orbit/">+ <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="3D Model Orbit — Animation Handbook">+ <meta name="twitter:description" content="Phong-shaded 3D geometry in vanilla WebGL — vertex buffers, MVP matrix, and a full lighting model.">+ <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": "3D Model Orbit", "name": "3D Model Orbit", "description": "Phong-shaded 3D geometry in vanilla WebGL — vertex buffers, MVP matrix, and a full lighting model.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/3d-model-orbit/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, 3D Model Orbit"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -36,8 +50,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../scroll-driven-3d-rotation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/3d-model-orbit/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>3D Model Orbit</h1><p>Phong-shaded 3D geometry in vanilla WebGL — vertex buffers, MVP matrix, and a full lighting model.</p>@@ -252,5 +280,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused&&gl){lastT=performance.now();raf=requestAnimationFrame(render);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/README.md b/animations/06-3d-advanced/README.mdindex 252b2e31..cd7acd17 100644--- a/animations/06-3d-advanced/README.md+++ b/animations/06-3d-advanced/README.md@@ -23,6 +23,7 @@ WebGL, shaders, particles, 3D transforms, and the performance-sensitive effects| [Cloth Simulation](cloth-simulation/) | Verlet integration + distance constraints — draggable, gravity, and wind-responsive || [Volumetric Smoke](volumetric-smoke/) | Ray marching that accumulates 3D noise density — light scattering, shadow rays || [Morphing Blob](morphing-blob/) | Metaball circles fused by an SVG blur-plus-contrast filter — drifts and a droplet chases the pointer |+| [3D Flip Card](flip-card-3d/) | A card rotates in 3D to reveal its back face — preserve-3d + backface-visibility |## Key conceptsdiff --git a/animations/06-3d-advanced/canvas-particle-effect/index.html b/animations/06-3d-advanced/canvas-particle-effect/index.htmlindex 359b9a38..c7260e1a 100644--- a/animations/06-3d-advanced/canvas-particle-effect/index.html+++ b/animations/06-3d-advanced/canvas-particle-effect/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Canvas Particle Effect</title>+ <title>Canvas Particle Effect — Animation Handbook</title>+ <meta name="description" content="500 particles drifting with O(n²) proximity connections — mouse repels or attracts within a configurable radius.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/canvas-particle-effect/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Canvas Particle Effect — Animation Handbook">+ <meta property="og:description" content="500 particles drifting with O(n²) proximity connections — mouse repels or attracts within a configurable radius.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/canvas-particle-effect/">+ <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="Canvas Particle Effect — Animation Handbook">+ <meta name="twitter:description" content="500 particles drifting with O(n²) proximity connections — mouse repels or attracts within a configurable radius.">+ <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": "Canvas Particle Effect", "name": "Canvas Particle Effect", "description": "500 particles drifting with O(n²) proximity connections — mouse repels or attracts within a configurable radius.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/canvas-particle-effect/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Canvas Particle Effect"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -36,8 +50,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../parallax-3d-tilt/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../fluid-simulation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/canvas-particle-effect/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Canvas Particle Effect</h1><p>500 particles drifting with O(n²) proximity connections — mouse repels or attracts within a configurable radius.</p>@@ -160,5 +188,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused)start();});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/chromatic-aberration/index.html b/animations/06-3d-advanced/chromatic-aberration/index.htmlindex 52b717a0..47b3aa04 100644--- a/animations/06-3d-advanced/chromatic-aberration/index.html+++ b/animations/06-3d-advanced/chromatic-aberration/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Chromatic Aberration</title>+ <title>Chromatic Aberration — Animation Handbook</title>+ <meta name="description" content="RGB channels offset in opposite directions — three screened layers faking lens color fringing.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/chromatic-aberration/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Chromatic Aberration — Animation Handbook">+ <meta property="og:description" content="RGB channels offset in opposite directions — three screened layers faking lens color fringing.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/chromatic-aberration/">+ <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="Chromatic Aberration — Animation Handbook">+ <meta name="twitter:description" content="RGB channels offset in opposite directions — three screened layers faking lens color fringing.">+ <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": "Chromatic Aberration", "name": "Chromatic Aberration", "description": "RGB channels offset in opposite directions — three screened layers faking lens color fringing.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/chromatic-aberration/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Chromatic Aberration"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -73,8 +87,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:380px}}@media(prefers-reduced-motion:reduce){.ca-r,.ca-b{animation:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../svg-path-animation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../2-5d-pseudo-3d/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/chromatic-aberration/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Chromatic Aberration</h1><p>RGB channels offset in opposite directions — three screened layers faking lens color fringing.</p>@@ -153,5 +181,6 @@applyOffset();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/cloth-simulation/index.html b/animations/06-3d-advanced/cloth-simulation/index.htmlindex 7ff44bb4..4f79e284 100644--- a/animations/06-3d-advanced/cloth-simulation/index.html+++ b/animations/06-3d-advanced/cloth-simulation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Cloth / Soft-Body Simulation</title>+ <title>Cloth / Soft-Body Simulation — Animation Handbook</title>+ <meta name="description" content="Verlet integration + distance constraints — the physics behind cloth in games. Drag to pull vertices.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/cloth-simulation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Cloth / Soft-Body Simulation — Animation Handbook">+ <meta property="og:description" content="Verlet integration + distance constraints — the physics behind cloth in games. Drag to pull vertices.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/cloth-simulation/">+ <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="Cloth / Soft-Body Simulation — Animation Handbook">+ <meta name="twitter:description" content="Verlet integration + distance constraints — the physics behind cloth in games. Drag to pull vertices.">+ <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": "Cloth / Soft-Body Simulation", "name": "Cloth / Soft-Body Simulation", "description": "Verlet integration + distance constraints — the physics behind cloth in games. Drag to pull vertices.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/cloth-simulation/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Cloth / Soft-Body Simulation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -34,8 +48,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:400px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../image-distortion-hover/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../volumetric-smoke/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/cloth-simulation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Cloth / Soft-Body Simulation</h1><p>Verlet integration + distance constraints — the physics behind cloth in games. Drag to pull vertices.</p>@@ -206,5 +234,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{});window.addEventListener('resize',()=>{resize();initCloth();});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/flip-card-3d/README.md b/animations/06-3d-advanced/flip-card-3d/README.mdnew file mode 100644index 00000000..af42ff81--- /dev/null+++ b/animations/06-3d-advanced/flip-card-3d/README.md@@ -0,0 +1,71 @@+# 3D Flip Card++## What it is+A flip card is a single element with a front and back face that rotates in three dimensions to swap which side is visible. The rotation happens in real 3D space rather than a 2D crossfade: a `perspective` on the container gives the turn depth, `transform-style: preserve-3d` keeps both faces in the same 3D scene, and `backface-visibility: hidden` hides whichever side is turned away from the viewer. An optional cursor-driven tilt while the card is idle adds a sense of physical depth before the flip.++## When to use it+- Profile, team, or contact cards where the back holds secondary details+- Product cards that reveal specs or pricing on the reverse+- Flashcards and quiz UIs where question and answer live on two sides+- Gallery tiles where hover reveals a caption or call to action+- Any place a straight crossfade would feel flat and you want a tactile, physical turn++## How it works+Three properties do the work. `perspective` goes on the **container**, `preserve-3d` on the rotating **inner** element, and `backface-visibility: hidden` on **each face**. The back face is pre-rotated 180 degrees so it reads correctly once the card turns:++```css+.stage { perspective: 1200px; } /* camera depth, on the parent */++.card {+ transform-style: preserve-3d; /* faces share one 3D scene */+ transition: transform 650ms cubic-bezier(.6,.02,.2,1);+}+.card.flipped { transform: rotateY(180deg); }++.face {+ position: absolute; inset: 0;+ backface-visibility: hidden; /* hide the side facing away */+}+.back { transform: rotateY(180deg); } /* pre-flip so it faces out */+```++Toggling is a single class, so the same markup works for click, keyboard, and hover triggers:++```js+card.addEventListener('click', () => card.classList.toggle('flipped'));+card.addEventListener('keydown', e => {+ if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); card.classList.toggle('flipped'); }+});+```++The idle tilt is separate from the flip. A wrapper between the perspective container and the card rotates a few degrees toward the pointer, tracked with Pointer Events so it works for mouse and pen alike:++```js+stage.addEventListener('pointermove', e => {+ const r = stage.getBoundingClientRect();+ const x = (e.clientX - r.left) / r.width - 0.5;+ const y = (e.clientY - r.top) / r.height - 0.5;+ tilt.style.transform = `rotateX(${-y * 10}deg) rotateY(${x * 10}deg)`;+});+```++## Key parameters+| Parameter | Default | Effect |+|-----------|---------|--------|+| Flip axis | rotateY | `rotateY` turns left/right; `rotateX` turns top/bottom. Match the back face's pre-rotation to the axis. |+| Flip duration | 650ms | 150–300ms feels snappy; 600–900ms feels physical; over ~1200ms drags. |+| Perspective depth | 1200px | Lower (500px) exaggerates the turn into a fish-eye; higher (2500px) flattens it toward a 2D spin. |+| Idle tilt strength | 10° | Degrees of pre-flip lean toward the cursor. 0 disables it; over ~20° feels unstable. |+| Trigger | Click | Click/tap toggles; hover flips on pointer enter and restores on leave. |++## Production notes+- **Backface-visibility support**: both faces must be absolutely positioned and stacked, and the inner element must have `preserve-3d`. If `preserve-3d` is missing (or a property like `overflow` or `filter` flattens the context), both faces render and the back bleeds through.+- **Safari flicker**: WebKit can flash the hidden face mid-rotation. Add `-webkit-backface-visibility: hidden` and nudge each face with `transform: translateZ(0)` (or `translateZ(1px)`) to force a stable compositing layer. Avoid `overflow`/`filter` on the `preserve-3d` element, as they can collapse the 3D context.+- **Accessibility**: the flip must be keyboard-triggerable — make the card focusable (`tabindex="0"`, `role="button"`) and flip on Enter/Space, with a visible focus ring. Because `backface-visibility: hidden` only hides visuals, the back face's text stays in the accessibility tree and is reachable; expose state with `aria-pressed`. Do not hide the reverse content behind hover alone.+- **Reduced motion**: under `prefers-reduced-motion: reduce`, drop the rotation and the tilt entirely and swap faces with an instant opacity change instead, so the information is still available without vestibular-triggering movement.+- **Libraries**: Framer Motion animates this with `rotateY` on a motion component and `AnimatePresence` for the face swap; GSAP handles it with `rotationY` plus `transformPerspective`/`transformStyle`. The vanilla CSS version above needs no dependency for the common case.++## See also+- [Parallax 3D Tilt](../parallax-3d-tilt/)+- [Scroll-Driven 3D Rotation](../scroll-driven-3d-rotation/)+- [Glassmorphism Animated](../glassmorphism-animated/)diff --git a/animations/06-3d-advanced/flip-card-3d/index.html b/animations/06-3d-advanced/flip-card-3d/index.htmlnew file mode 100644index 00000000..c5ea3f1b--- /dev/null+++ b/animations/06-3d-advanced/flip-card-3d/index.html@@ -0,0 +1,232 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>3D Flip Card — Animation Handbook</title>+ <meta name="description" content="A card rotates in 3D on rotateY/rotateX to reveal its back face, with an optional cursor-driven idle tilt for depth.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/flip-card-3d/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="3D Flip Card — Animation Handbook">+ <meta property="og:description" content="A card rotates in 3D on rotateY/rotateX to reveal its back face, with an optional cursor-driven idle tilt for depth.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/flip-card-3d/">+ <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="3D Flip Card — Animation Handbook">+ <meta name="twitter:description" content="A card rotates in 3D on rotateY/rotateX to reveal its back face, with an optional cursor-driven idle tilt for depth.">+ <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": "3D Flip Card", "name": "3D Flip Card", "description": "A card rotates in 3D on rotateY/rotateX to reveal its back face, with an optional cursor-driven idle tilt for depth.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/flip-card-3d/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, 3D Flip Card"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#b98cff;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--perspective:1200px;--flip-dur:650ms;--tilt:10}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(11px,1.8vw,15px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ .stage{height:clamp(360px,52vh,560px);border:1px solid var(--ui-border);border-radius:8px;background:radial-gradient(120% 120% at 50% 0%,#141018,#08070a);display:flex;align-items:center;justify-content:center;padding:clamp(20px,4vw,48px);perspective:var(--perspective)}+ /* Tilt wrapper carries the idle cursor-driven 3D tilt */+ .tilt{transform-style:preserve-3d;transition:transform 300ms ease}+ .tilt.tracking{transition:none}+ /* Card — the flipping element */+ .card{+ width:clamp(220px,60%,300px);aspect-ratio:5/7;position:relative;+ transform-style:preserve-3d;cursor:pointer;+ transition:transform var(--flip-dur) cubic-bezier(.6,.02,.2,1);+ will-change:transform+ }+ .card.flipped{transform:rotateY(180deg)}+ .card.axis-x.flipped{transform:rotateX(180deg)}+ .card:focus-visible{outline:2px solid var(--ui-accent);outline-offset:6px;border-radius:16px}+ .face{+ position:absolute;inset:0;border-radius:16px;overflow:hidden;+ backface-visibility:hidden;-webkit-backface-visibility:hidden;+ transform:translateZ(0);+ border:1px solid rgba(255,255,255,.12);+ box-shadow:0 24px 60px rgba(0,0,0,.55);+ display:flex;flex-direction:column;padding:clamp(16px,4%,24px)+ }+ /* Front — profile face */+ .front{background:linear-gradient(150deg,#2a1a4a,#1a1030)}+ .card.axis-x .back{transform:rotateX(180deg)}+ .card:not(.axis-x) .back{transform:rotateY(180deg)}+ .avatar{width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#b98cff,#6d4ea8);display:flex;align-items:center;justify-content:center;font-family:var(--disp);font-weight:800;font-size:22px;color:#0b0b0d}+ .front .name{font-family:var(--disp);font-weight:700;font-size:clamp(16px,2.4vw,22px);margin-top:auto;color:#fff;line-height:1.15}+ .front .role{font-size:11px;color:var(--ui-accent);letter-spacing:1px;margin-top:6px;text-transform:uppercase}+ .front .hint{font-size:9px;color:rgba(255,255,255,.4);margin-top:14px;letter-spacing:.5px}+ /* Back — details face */+ .back{background:linear-gradient(150deg,#120c1e,#0d0a16)}+ .back .over{font-size:9px;letter-spacing:2px;text-transform:uppercase;color:var(--ui-accent)}+ .back .row{display:flex;justify-content:space-between;font-size:11px;color:rgba(255,255,255,.7);padding:8px 0;border-bottom:1px solid rgba(255,255,255,.07)}+ .back .row span:last-child{color:#fff}+ .back .rows{margin-top:auto}+ .back .hint{font-size:9px;color:rgba(255,255,255,.4);margin-top:14px;letter-spacing:.5px}+ /* Panel */+ aside{width:clamp(200px,22vw,240px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+ .sr{display:flex;align-items:center;gap:6px;font-size:10px}+ .sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+ .sv{width:52px;text-align:right;color:var(--ui-text)}+ .seg{display:flex;gap:4px}+ .seg button{flex:1;min-height:44px;background:#08070a;border:1px solid var(--ui-border);color:var(--ui-muted);border-radius:6px;font:inherit;font-size:10px;cursor:pointer}+ .seg button.on{border-color:var(--ui-accent);color:var(--ui-text)}+ .div{height:1px;background:var(--ui-border)}+ .flip-btn{min-height:44px;background:var(--ui-accent);border:0;border-radius:6px;color:#0b0b0d;font:inherit;font-weight:600;font-size:11px;cursor:pointer}+ @media(max-width:600px){.layout{flex-direction:column}aside{width:100%}}+ /* Tilt only on true hover-capable pointers */+ @media(hover:hover){.tilt{will-change:transform}}+ @media(hover:none){.tilt{transform:none!important}}+ /* Reduced motion — instant opacity swap, no tilt, no rotation */+ @media(prefers-reduced-motion:reduce){+ .card{transition:none!important;transform:none!important}+ .tilt{transition:none!important;transform:none!important}+ .face{backface-visibility:visible;-webkit-backface-visibility:visible;transition:opacity 120ms linear}+ .card:not(.axis-x) .back,.card.axis-x .back{transform:none}+ .back{opacity:0}+ .card.flipped .front{opacity:0}+ .card.flipped .back{opacity:1}+ }+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../morphing-blob/" rel="prev" title="Previous">‹ Prev</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/flip-card-3d/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>3D Flip Card</h1>+ <p>A card rotates in 3D on rotateY/rotateX to reveal its back face, with an optional cursor-driven idle tilt for depth.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage" id="stage">+ <div class="tilt" id="tilt">+ <div class="card" id="card" tabindex="0" role="button" aria-pressed="false" aria-label="Flip card to see details">+ <div class="face front">+ <div class="avatar">AV</div>+ <div class="name">Ava Reyes</div>+ <div class="role">Motion Engineer</div>+ <div class="hint">Click / tap / Enter to flip →</div>+ </div>+ <div class="face back">+ <div class="over">Details</div>+ <div class="rows">+ <div class="row"><span>Team</span><span>Interface Systems</span></div>+ <div class="row"><span>Location</span><span>Lisbon</span></div>+ <div class="row"><span>Focus</span><span>CSS 3D · WebGL</span></div>+ <div class="row"><span>Joined</span><span>2021</span></div>+ </div>+ <div class="hint">← Flip back</div>+ </div>+ </div>+ </div>+ </div>+ </div>+ <aside>+ <p class="note">perspective sits on the stage. The inner card uses transform-style:preserve-3d; each face is backface-visibility:hidden so only the facing side shows.</p>+ <div class="lbl">Flip axis</div>+ <div class="seg" id="axis">+ <button data-axis="y" class="on">rotateY</button>+ <button data-axis="x">rotateX</button>+ </div>+ <div class="lbl">Trigger</div>+ <div class="seg" id="trigger">+ <button data-trig="click" class="on">Click</button>+ <button data-trig="hover">Hover</button>+ </div>+ <div class="lbl">Flip duration</div>+ <div class="sr"><input type="range" id="dur-sl" min="150" max="1400" value="650" step="50"><span class="sv" id="dur-v">650ms</span></div>+ <div class="lbl">Perspective depth</div>+ <div class="sr"><input type="range" id="persp-sl" min="500" max="2500" value="1200" step="50"><span class="sv" id="persp-v">1200px</span></div>+ <div class="lbl">Idle tilt strength</div>+ <div class="sr"><input type="range" id="tilt-sl" min="0" max="20" value="10" step="1"><span class="sv" id="tilt-v">10°</span></div>+ <div class="div"></div>+ <button class="flip-btn" id="flip-btn">Flip card</button>+ </aside>+</div>+<script>+ const stage=document.getElementById('stage');+ const tilt=document.getElementById('tilt');+ const card=document.getElementById('card');+ const root=document.documentElement.style;+ let axis='y',trigger='click',maxTilt=10;++ function setFlipped(on){+ card.classList.toggle('flipped',on);+ card.setAttribute('aria-pressed',on?'true':'false');+ }+ function toggle(){setFlipped(!card.classList.contains('flipped'));}++ // Trigger: click+ card.addEventListener('click',()=>{if(trigger==='click')toggle();});+ document.getElementById('flip-btn').addEventListener('click',toggle);+ // Keyboard — flip is reachable and operable without a pointer+ card.addEventListener('keydown',e=>{+ if(e.key==='Enter'||e.key===' '){e.preventDefault();toggle();}+ });+ // Trigger: hover (pointer-capable devices only)+ card.addEventListener('pointerenter',e=>{if(trigger==='hover'&&e.pointerType!=='touch')setFlipped(true);});+ card.addEventListener('pointerleave',()=>{if(trigger==='hover')setFlipped(false);});++ // Cursor-driven idle 3D tilt via Pointer Events+ const reduce=matchMedia('(prefers-reduced-motion:reduce)');+ const canHover=matchMedia('(hover:hover)');+ stage.addEventListener('pointermove',e=>{+ if(reduce.matches||!canHover.matches||maxTilt===0)return;+ const r=stage.getBoundingClientRect();+ const x=(e.clientX-r.left)/r.width-.5;+ const y=(e.clientY-r.top)/r.height-.5;+ tilt.classList.add('tracking');+ tilt.style.transform=`rotateX(${(-y*maxTilt).toFixed(2)}deg) rotateY(${(x*maxTilt).toFixed(2)}deg)`;+ });+ stage.addEventListener('pointerleave',()=>{+ tilt.classList.remove('tracking');+ tilt.style.transform='rotateX(0deg) rotateY(0deg)';+ });++ // Controls+ document.querySelectorAll('#axis button').forEach(b=>b.addEventListener('click',()=>{+ axis=b.dataset.axis;+ document.querySelectorAll('#axis button').forEach(x=>x.classList.toggle('on',x===b));+ card.classList.toggle('axis-x',axis==='x');+ }));+ document.querySelectorAll('#trigger button').forEach(b=>b.addEventListener('click',()=>{+ trigger=b.dataset.trig;+ document.querySelectorAll('#trigger button').forEach(x=>x.classList.toggle('on',x===b));+ if(trigger==='hover')setFlipped(false);+ }));+ document.getElementById('dur-sl').addEventListener('input',e=>{+ root.setProperty('--flip-dur',e.target.value+'ms');+ document.getElementById('dur-v').textContent=e.target.value+'ms';+ });+ document.getElementById('persp-sl').addEventListener('input',e=>{+ root.setProperty('--perspective',e.target.value+'px');+ document.getElementById('persp-v').textContent=e.target.value+'px';+ });+ document.getElementById('tilt-sl').addEventListener('input',e=>{+ maxTilt=+e.target.value;+ document.getElementById('tilt-v').textContent=maxTilt+'°';+ if(maxTilt===0)tilt.style.transform='rotateX(0deg) rotateY(0deg)';+ });+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/06-3d-advanced/fluid-simulation/index.html b/animations/06-3d-advanced/fluid-simulation/index.htmlindex 63278a4f..9d80fa82 100644--- a/animations/06-3d-advanced/fluid-simulation/index.html+++ b/animations/06-3d-advanced/fluid-simulation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Fluid / Liquid Simulation</title>+ <title>Fluid / Liquid Simulation — Animation Handbook</title>+ <meta name="description" content="WebGL metaballs — SDF spheres that merge smoothly via smooth-minimum in a GLSL fragment shader.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/fluid-simulation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Fluid / Liquid Simulation — Animation Handbook">+ <meta property="og:description" content="WebGL metaballs — SDF spheres that merge smoothly via smooth-minimum in a GLSL fragment shader.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/fluid-simulation/">+ <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="Fluid / Liquid Simulation — Animation Handbook">+ <meta name="twitter:description" content="WebGL metaballs — SDF spheres that merge smoothly via smooth-minimum in a GLSL fragment shader.">+ <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": "Fluid / Liquid Simulation", "name": "Fluid / Liquid Simulation", "description": "WebGL metaballs — SDF spheres that merge smoothly via smooth-minimum in a GLSL fragment shader.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/fluid-simulation/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Fluid / Liquid Simulation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -35,8 +49,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../canvas-particle-effect/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../glassmorphism-animated/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/fluid-simulation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Fluid / Liquid Simulation</h1><p>WebGL metaballs — SDF spheres that merge smoothly via smooth-minimum in a GLSL fragment shader.</p>@@ -178,5 +206,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused&&gl){lastT=performance.now();raf=requestAnimationFrame(render);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/glassmorphism-animated/index.html b/animations/06-3d-advanced/glassmorphism-animated/index.htmlindex a74b9d91..a32e62f8 100644--- a/animations/06-3d-advanced/glassmorphism-animated/index.html+++ b/animations/06-3d-advanced/glassmorphism-animated/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Glassmorphism Animated</title>+ <title>Glassmorphism Animated — Animation Handbook</title>+ <meta name="description" content="Frosted glass cards over animated gradient blobs — backdrop-filter: blur() + semi-transparent background.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/glassmorphism-animated/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Glassmorphism Animated — Animation Handbook">+ <meta property="og:description" content="Frosted glass cards over animated gradient blobs — backdrop-filter: blur() + semi-transparent background.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/glassmorphism-animated/">+ <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="Glassmorphism Animated — Animation Handbook">+ <meta name="twitter:description" content="Frosted glass cards over animated gradient blobs — backdrop-filter: blur() + semi-transparent background.">+ <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": "Glassmorphism Animated", "name": "Glassmorphism Animated", "description": "Frosted glass cards over animated gradient blobs — backdrop-filter: blur() + semi-transparent background.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/glassmorphism-animated/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Glassmorphism Animated"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -80,8 +94,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:460px}}@media(prefers-reduced-motion:reduce){.blob,.glass-card.g2,.glass-card.g3{animation:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../fluid-simulation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../webgl-shader-animation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/glassmorphism-animated/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Glassmorphism Animated</h1><p>Frosted glass cards over animated gradient blobs — backdrop-filter: blur() + semi-transparent background.</p>@@ -171,5 +199,6 @@});});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/gpgpu-particle-system/index.html b/animations/06-3d-advanced/gpgpu-particle-system/index.htmlindex 72fea179..5043ff2e 100644--- a/animations/06-3d-advanced/gpgpu-particle-system/index.html+++ b/animations/06-3d-advanced/gpgpu-particle-system/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>GPGPU Particle System</title>+ <title>GPGPU Particle System — Animation Handbook</title>+ <meta name="description" content="65k+ particle positions stored in a texture — physics computed by a fragment shader each frame (texture ping-pong).">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/gpgpu-particle-system/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="GPGPU Particle System — Animation Handbook">+ <meta property="og:description" content="65k+ particle positions stored in a texture — physics computed by a fragment shader each frame (texture ping-pong).">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/gpgpu-particle-system/">+ <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="GPGPU Particle System — Animation Handbook">+ <meta name="twitter:description" content="65k+ particle positions stored in a texture — physics computed by a fragment shader each frame (texture ping-pong).">+ <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": "GPGPU Particle System", "name": "GPGPU Particle System", "description": "65k+ particle positions stored in a texture — physics computed by a fragment shader each frame (texture ping-pong).", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/gpgpu-particle-system/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, GPGPU Particle System"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -38,8 +52,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../ray-marching-sdf/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../image-distortion-hover/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/gpgpu-particle-system/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>GPGPU Particle System</h1><p>65k+ particle positions stored in a texture — physics computed by a fragment shader each frame (texture ping-pong).</p>@@ -262,5 +290,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused&&gl){lastT=performance.now();raf=requestAnimationFrame(render);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/image-distortion-hover/index.html b/animations/06-3d-advanced/image-distortion-hover/index.htmlindex 8fcb3d5c..fe2dae96 100644--- a/animations/06-3d-advanced/image-distortion-hover/index.html+++ b/animations/06-3d-advanced/image-distortion-hover/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Image Distortion on Hover</title>+ <title>Image Distortion on Hover — Animation Handbook</title>+ <meta name="description" content="Fragment shader displaces UV coordinates around the cursor — ripple, push, liquid, or pixelate.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/image-distortion-hover/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Image Distortion on Hover — Animation Handbook">+ <meta property="og:description" content="Fragment shader displaces UV coordinates around the cursor — ripple, push, liquid, or pixelate.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/image-distortion-hover/">+ <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="Image Distortion on Hover — Animation Handbook">+ <meta name="twitter:description" content="Fragment shader displaces UV coordinates around the cursor — ripple, push, liquid, or pixelate.">+ <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": "Image Distortion on Hover", "name": "Image Distortion on Hover", "description": "Fragment shader displaces UV coordinates around the cursor — ripple, push, liquid, or pixelate.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/image-distortion-hover/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Image Distortion on Hover"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -35,8 +49,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../gpgpu-particle-system/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../cloth-simulation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/image-distortion-hover/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Image Distortion on Hover</h1><p>Fragment shader displaces UV coordinates around the cursor — ripple, push, liquid, or pixelate.</p>@@ -170,5 +198,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused&&gl){lastT=performance.now();startT=lastT;raf=requestAnimationFrame(render);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/morphing-blob/index.html b/animations/06-3d-advanced/morphing-blob/index.htmlindex 7be68ba1..1ac2a69f 100644--- a/animations/06-3d-advanced/morphing-blob/index.html+++ b/animations/06-3d-advanced/morphing-blob/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Morphing Blob</title>+ <title>Morphing Blob — Animation Handbook</title>+ <meta name="description" content="An organic gooey blob built from metaball circles fused by an SVG blur-plus-contrast filter — it drifts on its own and a droplet chases your pointer, merging and splitting like liquid.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/morphing-blob/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Morphing Blob — Animation Handbook">+ <meta property="og:description" content="An organic gooey blob built from metaball circles fused by an SVG blur-plus-contrast filter — it drifts on its own and a droplet chases your pointer, merging and splitting like liquid.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/morphing-blob/">+ <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="Morphing Blob — Animation Handbook">+ <meta name="twitter:description" content="An organic gooey blob built from metaball circles fused by an SVG blur-plus-contrast filter — it drifts on its own and a droplet chases your pointer, merging and splitting like liquid.">+ <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": "Morphing Blob", "name": "Morphing Blob", "description": "An organic gooey blob built from metaball circles fused by an SVG blur-plus-contrast filter — it drifts on its own and a droplet chases your pointer, merging and splitting like liquid.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/morphing-blob/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Morphing Blob"}</script><style>:root{--bg:#0b0b0d;--stage:#08060e;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);@@ -32,8 +46,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:56vh}}@media(prefers-reduced-motion:reduce){.tip{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../volumetric-smoke/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../flip-card-3d/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/morphing-blob/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Morphing Blob</h1><p>An organic gooey blob built from metaball circles fused by an SVG blur-plus-contrast filter — it drifts on its own and a droplet chases your pointer, merging and splitting like liquid.</p>@@ -160,5 +188,6 @@ function paintStatic(){ // one settled arrangement, no idle motionif(reduce){speed=0;paintStatic();}else{raf=requestAnimationFrame(frame);}</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/noise-based-motion/index.html b/animations/06-3d-advanced/noise-based-motion/index.htmlindex 4cbe5576..11cbe522 100644--- a/animations/06-3d-advanced/noise-based-motion/index.html+++ b/animations/06-3d-advanced/noise-based-motion/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Noise-Based Motion</title>+ <title>Noise-Based Motion — Animation Handbook</title>+ <meta name="description" content="Simplex noise drives organic non-repeating movement — a field of dots and a morphing blob.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/noise-based-motion/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Noise-Based Motion — Animation Handbook">+ <meta property="og:description" content="Simplex noise drives organic non-repeating movement — a field of dots and a morphing blob.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/noise-based-motion/">+ <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="Noise-Based Motion — Animation Handbook">+ <meta name="twitter:description" content="Simplex noise drives organic non-repeating movement — a field of dots and a morphing blob.">+ <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": "Noise-Based Motion", "name": "Noise-Based Motion", "description": "Simplex noise drives organic non-repeating movement — a field of dots and a morphing blob.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/noise-based-motion/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Noise-Based Motion"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -33,8 +47,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../webgl-shader-animation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../svg-path-animation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/noise-based-motion/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Noise-Based Motion</h1><p>Simplex noise drives organic non-repeating movement — a field of dots and a morphing blob.</p>@@ -168,5 +196,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{});window.addEventListener('resize',()=>{resize();});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/parallax-3d-tilt/index.html b/animations/06-3d-advanced/parallax-3d-tilt/index.htmlindex f0f47ea6..bd081570 100644--- a/animations/06-3d-advanced/parallax-3d-tilt/index.html+++ b/animations/06-3d-advanced/parallax-3d-tilt/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Parallax 3D Tilt</title>+ <title>Parallax 3D Tilt — Animation Handbook</title>+ <meta name="description" content="CSS perspective + rotateX/Y driven by mouse position — a shine highlight tracks the cursor across the card surface.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/parallax-3d-tilt/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Parallax 3D Tilt — Animation Handbook">+ <meta property="og:description" content="CSS perspective + rotateX/Y driven by mouse position — a shine highlight tracks the cursor across the card surface.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/parallax-3d-tilt/">+ <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="Parallax 3D Tilt — Animation Handbook">+ <meta name="twitter:description" content="CSS perspective + rotateX/Y driven by mouse position — a shine highlight tracks the cursor across the card surface.">+ <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": "Parallax 3D Tilt", "name": "Parallax 3D Tilt", "description": "CSS perspective + rotateX/Y driven by mouse position — a shine highlight tracks the cursor across the card surface.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/parallax-3d-tilt/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Parallax 3D Tilt"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -62,8 +76,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px;padding:32px 16px}}@media(prefers-reduced-motion:reduce){.tilt-card{transition:none!important;transform:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../scroll-driven-3d-rotation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../canvas-particle-effect/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/parallax-3d-tilt/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Parallax 3D Tilt</h1><p>CSS perspective + rotateX/Y driven by mouse position — a shine highlight tracks the cursor across the card surface.</p>@@ -161,5 +189,6 @@document.getElementById('invert-tog').addEventListener('change',e=>{invert=e.target.checked});document.getElementById('scale-tog').addEventListener('change',e=>{scaleOn=e.target.checked});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/ray-marching-sdf/index.html b/animations/06-3d-advanced/ray-marching-sdf/index.htmlindex 8adf8e6a..d7287b6a 100644--- a/animations/06-3d-advanced/ray-marching-sdf/index.html+++ b/animations/06-3d-advanced/ray-marching-sdf/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Ray Marching / SDF Scene</title>+ <title>Ray Marching / SDF Scene — Animation Handbook</title>+ <meta name="description" content="3D rendered entirely in a fragment shader — no meshes, no vertices. Every surface is pure math.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/ray-marching-sdf/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Ray Marching / SDF Scene — Animation Handbook">+ <meta property="og:description" content="3D rendered entirely in a fragment shader — no meshes, no vertices. Every surface is pure math.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/ray-marching-sdf/">+ <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="Ray Marching / SDF Scene — Animation Handbook">+ <meta name="twitter:description" content="3D rendered entirely in a fragment shader — no meshes, no vertices. Every surface is pure math.">+ <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": "Ray Marching / SDF Scene", "name": "Ray Marching / SDF Scene", "description": "3D rendered entirely in a fragment shader — no meshes, no vertices. Every surface is pure math.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/ray-marching-sdf/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Ray Marching / SDF Scene"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -36,8 +50,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../2-5d-pseudo-3d/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../gpgpu-particle-system/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/ray-marching-sdf/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Ray Marching / SDF Scene</h1><p>3D rendered entirely in a fragment shader — no meshes, no vertices. Every surface is pure math.</p>@@ -214,5 +242,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused&&gl){lastT=performance.now();startT=lastT;raf=requestAnimationFrame(render);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/scroll-driven-3d-rotation/index.html b/animations/06-3d-advanced/scroll-driven-3d-rotation/index.htmlindex 39c4b929..1dde3283 100644--- a/animations/06-3d-advanced/scroll-driven-3d-rotation/index.html+++ b/animations/06-3d-advanced/scroll-driven-3d-rotation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Scroll-Driven 3D Rotation</title>+ <title>Scroll-Driven 3D Rotation — Animation Handbook</title>+ <meta name="description" content="Scroll progress choreographs 3D rotation through four stages — the Apple product-page pattern.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/scroll-driven-3d-rotation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Scroll-Driven 3D Rotation — Animation Handbook">+ <meta property="og:description" content="Scroll progress choreographs 3D rotation through four stages — the Apple product-page pattern.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/scroll-driven-3d-rotation/">+ <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="Scroll-Driven 3D Rotation — Animation Handbook">+ <meta name="twitter:description" content="Scroll progress choreographs 3D rotation through four stages — the Apple product-page pattern.">+ <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": "Scroll-Driven 3D Rotation", "name": "Scroll-Driven 3D Rotation", "description": "Scroll progress choreographs 3D rotation through four stages — the Apple product-page pattern.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/scroll-driven-3d-rotation/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Scroll-Driven 3D Rotation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -59,8 +73,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:480px}.info-panel{width:120px;padding:12px}}@media(prefers-reduced-motion:reduce){.obj-wrap{transition:none!important}.prog-fill{transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../3d-model-orbit/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../parallax-3d-tilt/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/scroll-driven-3d-rotation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Scroll-Driven 3D Rotation</h1><p>Scroll progress choreographs 3D rotation through four stages — the Apple product-page pattern.</p>@@ -176,5 +204,6 @@ document.getElementById('reset-btn').addEventListener('click',()=>{stageEl.scrollTop=0;currRx=currRy=0;currSc=1;applyRotation(0);});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/svg-path-animation/index.html b/animations/06-3d-advanced/svg-path-animation/index.htmlindex 8c27fce8..526b03bc 100644--- a/animations/06-3d-advanced/svg-path-animation/index.html+++ b/animations/06-3d-advanced/svg-path-animation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>SVG Path Animation</title>+ <title>SVG Path Animation — Animation Handbook</title>+ <meta name="description" content="stroke-dashoffset reveals a path from its start point — set dasharray to path length, animate offset to 0.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/svg-path-animation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="SVG Path Animation — Animation Handbook">+ <meta property="og:description" content="stroke-dashoffset reveals a path from its start point — set dasharray to path length, animate offset to 0.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/svg-path-animation/">+ <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="SVG Path Animation — Animation Handbook">+ <meta name="twitter:description" content="stroke-dashoffset reveals a path from its start point — set dasharray to path length, animate offset to 0.">+ <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": "SVG Path Animation", "name": "SVG Path Animation", "description": "stroke-dashoffset reveals a path from its start point — set dasharray to path length, animate offset to 0.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/svg-path-animation/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, SVG Path Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -47,8 +61,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:auto}.stage{height:auto;min-height:420px}}@media(prefers-reduced-motion:reduce){.draw-path{stroke-dashoffset:0!important;transition:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../noise-based-motion/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../chromatic-aberration/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/svg-path-animation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>SVG Path Animation</h1><p>stroke-dashoffset reveals a path from its start point — set dasharray to path length, animate offset to 0.</p>@@ -198,5 +226,6 @@ document.getElementById('ease-sel').addEventListener('change',()=>{});replay();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/volumetric-smoke/index.html b/animations/06-3d-advanced/volumetric-smoke/index.htmlindex b546fa14..e60508e5 100644--- a/animations/06-3d-advanced/volumetric-smoke/index.html+++ b/animations/06-3d-advanced/volumetric-smoke/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Volumetric Smoke / 3D Noise</title>+ <title>Volumetric Smoke / 3D Noise — Animation Handbook</title>+ <meta name="description" content="Ray marching through a 3D noise field — density accumulated along each ray for a true volumetric look.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/volumetric-smoke/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Volumetric Smoke / 3D Noise — Animation Handbook">+ <meta property="og:description" content="Ray marching through a 3D noise field — density accumulated along each ray for a true volumetric look.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/volumetric-smoke/">+ <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="Volumetric Smoke / 3D Noise — Animation Handbook">+ <meta name="twitter:description" content="Ray marching through a 3D noise field — density accumulated along each ray for a true volumetric look.">+ <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": "Volumetric Smoke / 3D Noise", "name": "Volumetric Smoke / 3D Noise", "description": "Ray marching through a 3D noise field — density accumulated along each ray for a true volumetric look.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/volumetric-smoke/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Volumetric Smoke / 3D Noise"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -36,8 +50,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../cloth-simulation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../morphing-blob/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/volumetric-smoke/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Volumetric Smoke / 3D Noise</h1><p>Ray marching through a 3D noise field — density accumulated along each ray for a true volumetric look.</p>@@ -189,5 +217,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused&&gl){lastT=performance.now();raf=requestAnimationFrame(render);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/06-3d-advanced/webgl-shader-animation/index.html b/animations/06-3d-advanced/webgl-shader-animation/index.htmlindex 9f4def2a..172c0757 100644--- a/animations/06-3d-advanced/webgl-shader-animation/index.html+++ b/animations/06-3d-advanced/webgl-shader-animation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>WebGL Shader Animation</title>+ <title>WebGL Shader Animation — Animation Handbook</title>+ <meta name="description" content="Four GLSL fragment shader presets — plasma, wave distortion, Voronoi, and kaleidoscope. Pure GPU math.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/webgl-shader-animation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="WebGL Shader Animation — Animation Handbook">+ <meta property="og:description" content="Four GLSL fragment shader presets — plasma, wave distortion, Voronoi, and kaleidoscope. Pure GPU math.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/webgl-shader-animation/">+ <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="WebGL Shader Animation — Animation Handbook">+ <meta name="twitter:description" content="Four GLSL fragment shader presets — plasma, wave distortion, Voronoi, and kaleidoscope. Pure GPU math.">+ <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": "WebGL Shader Animation", "name": "WebGL Shader Animation", "description": "Four GLSL fragment shader presets — plasma, wave distortion, Voronoi, and kaleidoscope. Pure GPU math.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/webgl-shader-animation/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, WebGL Shader Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -37,8 +51,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../glassmorphism-animated/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../noise-based-motion/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/06-3d-advanced/webgl-shader-animation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>WebGL Shader Animation</h1><p>Four GLSL fragment shader presets — plasma, wave distortion, Voronoi, and kaleidoscope. Pure GPU math.</p>@@ -197,5 +225,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused&&gl){lastT=performance.now();raf=requestAnimationFrame(render);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/README.md b/animations/07-ambient-background/README.mdindex 18d1faa5..a9f24667 100644--- a/animations/07-ambient-background/README.md+++ b/animations/07-ambient-background/README.md@@ -21,6 +21,8 @@ Passive, looping effects that hold visual interest without demanding attention.| [Particle Constellation](particle-constellation/) | Drifting nodes link with lines when they come close — the network-mesh hero background || [Flow Field](flow-field/) | Particles follow a noise-driven vector field, leaving flowing trails || [Synthwave Grid](synthwave-grid/) | A perspective grid scrolls toward a glowing sun — the retro synthwave horizon |+| [Matrix Rain](matrix-rain/) | Columns of glowing characters fall on canvas — bright leaders, fading trails |+| [Plasma Field](plasma/) | Summed sine fields make a flowing, organic color plasma on canvas |## The ambient mindsetdiff --git a/animations/07-ambient-background/abstract-geometric-motion/index.html b/animations/07-ambient-background/abstract-geometric-motion/index.htmlindex ac27b4dd..90a105fd 100644--- a/animations/07-ambient-background/abstract-geometric-motion/index.html+++ b/animations/07-ambient-background/abstract-geometric-motion/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Abstract Geometric Motion</title>+ <title>Abstract Geometric Motion — Animation Handbook</title>+ <meta name="description" content="Four hypnotic loops — polygons, rings, bars, color lines. Satisfying to watch, never demanding.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/abstract-geometric-motion/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Abstract Geometric Motion — Animation Handbook">+ <meta property="og:description" content="Four hypnotic loops — polygons, rings, bars, color lines. Satisfying to watch, never demanding.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/abstract-geometric-motion/">+ <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="Abstract Geometric Motion — Animation Handbook">+ <meta name="twitter:description" content="Four hypnotic loops — polygons, rings, bars, color lines. Satisfying to watch, never demanding.">+ <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": "Abstract Geometric Motion", "name": "Abstract Geometric Motion", "description": "Four hypnotic loops — polygons, rings, bars, color lines. Satisfying to watch, never demanding.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/abstract-geometric-motion/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Abstract Geometric Motion"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -36,8 +50,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:420px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../grid-dot-pattern-parallax/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../particle-constellation/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/abstract-geometric-motion/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Abstract Geometric Motion</h1><p>Four hypnotic loops — polygons, rings, bars, color lines. Satisfying to watch, never demanding.</p>@@ -194,5 +222,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused){lastT=performance.now();raf=requestAnimationFrame(loop);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/ambient-ripple/index.html b/animations/07-ambient-background/ambient-ripple/index.htmlindex a4efe579..aef05c5b 100644--- a/animations/07-ambient-background/ambient-ripple/index.html+++ b/animations/07-ambient-background/ambient-ripple/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Ambient Ripple Effect</title>+ <title>Ambient Ripple Effect — Animation Handbook</title>+ <meta name="description" content="Concentric rings expand from idle sources — automatic, periodic, decorative. Not click-triggered.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/ambient-ripple/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Ambient Ripple Effect — Animation Handbook">+ <meta property="og:description" content="Concentric rings expand from idle sources — automatic, periodic, decorative. Not click-triggered.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/ambient-ripple/">+ <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="Ambient Ripple Effect — Animation Handbook">+ <meta name="twitter:description" content="Concentric rings expand from idle sources — automatic, periodic, decorative. Not click-triggered.">+ <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": "Ambient Ripple Effect", "name": "Ambient Ripple Effect", "description": "Concentric rings expand from idle sources — automatic, periodic, decorative. Not click-triggered.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/ambient-ripple/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Ambient Ripple Effect"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -37,8 +51,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:420px}.stage{flex:none}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../breathing-glow/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../floating-elements/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/ambient-ripple/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Ambient Ripple Effect</h1><p>Concentric rings expand from idle sources — automatic, periodic, decorative. Not click-triggered.</p>@@ -143,5 +171,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused){lastT=performance.now();raf=requestAnimationFrame(loop);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/animated-gradient-background/index.html b/animations/07-ambient-background/animated-gradient-background/index.htmlindex 52c8de9f..39c60338 100644--- a/animations/07-ambient-background/animated-gradient-background/index.html+++ b/animations/07-ambient-background/animated-gradient-background/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Animated Gradient Background</title>+ <title>Animated Gradient Background — Animation Handbook</title>+ <meta name="description" content="CSS gradient shifts hue and position continuously — pure CSS, no JavaScript, seamless loop.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/animated-gradient-background/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Animated Gradient Background — Animation Handbook">+ <meta property="og:description" content="CSS gradient shifts hue and position continuously — pure CSS, no JavaScript, seamless loop.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/animated-gradient-background/">+ <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="Animated Gradient Background — Animation Handbook">+ <meta name="twitter:description" content="CSS gradient shifts hue and position continuously — pure CSS, no JavaScript, seamless loop.">+ <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": "Animated Gradient Background", "name": "Animated Gradient Background", "description": "CSS gradient shifts hue and position continuously — pure CSS, no JavaScript, seamless loop.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/animated-gradient-background/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Animated Gradient Background"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -52,8 +66,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:420px}.stage{flex:none}}@media(prefers-reduced-motion:reduce){.grad-bg{animation-duration:300s!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../mesh-gradient/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/animated-gradient-background/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Animated Gradient Background</h1><p>CSS gradient shifts hue and position continuously — pure CSS, no JavaScript, seamless loop.</p>@@ -115,5 +143,6 @@document.getElementById('pause-btn').textContent=paused?'▶ Resume':'⏸ Pause';});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/aurora/index.html b/animations/07-ambient-background/aurora/index.htmlindex 522b36bc..4a3033a7 100644--- a/animations/07-ambient-background/aurora/index.html+++ b/animations/07-ambient-background/aurora/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Aurora / Northern Lights</title>+ <title>Aurora / Northern Lights — Animation Handbook</title>+ <meta name="description" content="Tall color bands drift and skew horizontally — blurred gradient layers faking the waving curtain of light.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/aurora/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Aurora / Northern Lights — Animation Handbook">+ <meta property="og:description" content="Tall color bands drift and skew horizontally — blurred gradient layers faking the waving curtain of light.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/aurora/">+ <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="Aurora / Northern Lights — Animation Handbook">+ <meta name="twitter:description" content="Tall color bands drift and skew horizontally — blurred gradient layers faking the waving curtain of light.">+ <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": "Aurora / Northern Lights", "name": "Aurora / Northern Lights", "description": "Tall color bands drift and skew horizontally — blurred gradient layers faking the waving curtain of light.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/aurora/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Aurora / Northern Lights"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -64,8 +78,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:420px}.stage{flex:none}}@media(prefers-reduced-motion:reduce){.band{animation-duration:300s!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../mesh-gradient/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../grain-overlay/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/aurora/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Aurora / Northern Lights</h1><p>Tall color bands drift and skew horizontally — blurred gradient layers faking the waving curtain of light.</p>@@ -159,5 +187,6 @@applyPalette('classic');</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/breathing-glow/index.html b/animations/07-ambient-background/breathing-glow/index.htmlindex a80f09a7..7e3a7888 100644--- a/animations/07-ambient-background/breathing-glow/index.html+++ b/animations/07-ambient-background/breathing-glow/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Breathing / Pulsing Glow</title>+ <title>Breathing / Pulsing Glow — Animation Handbook</title>+ <meta name="description" content="Radial gradient expands and contracts on a 5-second cycle — mimicking a slow, relaxed breath.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/breathing-glow/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Breathing / Pulsing Glow — Animation Handbook">+ <meta property="og:description" content="Radial gradient expands and contracts on a 5-second cycle — mimicking a slow, relaxed breath.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/breathing-glow/">+ <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="Breathing / Pulsing Glow — Animation Handbook">+ <meta name="twitter:description" content="Radial gradient expands and contracts on a 5-second cycle — mimicking a slow, relaxed breath.">+ <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": "Breathing / Pulsing Glow", "name": "Breathing / Pulsing Glow", "description": "Radial gradient expands and contracts on a 5-second cycle — mimicking a slow, relaxed breath.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/breathing-glow/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Breathing / Pulsing Glow"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -61,8 +75,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:420px}}@media(prefers-reduced-motion:reduce){.glow,.glow2,.center-el{animation-duration:60s!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../starfield/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../ambient-ripple/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/breathing-glow/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Breathing / Pulsing Glow</h1><p>Radial gradient expands and contracts on a 5-second cycle — mimicking a slow, relaxed breath.</p>@@ -131,5 +159,6 @@document.getElementById('pause-btn').textContent=paused?'▶ Resume':'⏸ Pause';});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/floating-elements/index.html b/animations/07-ambient-background/floating-elements/index.htmlindex baaa4985..2b573ba4 100644--- a/animations/07-ambient-background/floating-elements/index.html+++ b/animations/07-ambient-background/floating-elements/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Floating Elements</title>+ <title>Floating Elements — Animation Handbook</title>+ <meta name="description" content="Geometric shapes drift on independent sine-wave paths — no two elements move in sync.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/floating-elements/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Floating Elements — Animation Handbook">+ <meta property="og:description" content="Geometric shapes drift on independent sine-wave paths — no two elements move in sync.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/floating-elements/">+ <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="Floating Elements — Animation Handbook">+ <meta name="twitter:description" content="Geometric shapes drift on independent sine-wave paths — no two elements move in sync.">+ <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": "Floating Elements", "name": "Floating Elements", "description": "Geometric shapes drift on independent sine-wave paths — no two elements move in sync.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/floating-elements/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Floating Elements"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -44,8 +58,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:420px}.stage{flex:none}}@media(prefers-reduced-motion:reduce){.el{animation:none!important;transform:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../ambient-ripple/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../grid-dot-pattern-parallax/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/floating-elements/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Floating Elements</h1><p>Geometric shapes drift on independent sine-wave paths — no two elements move in sync.</p>@@ -176,5 +204,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused){raf=requestAnimationFrame(loop);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/flow-field/index.html b/animations/07-ambient-background/flow-field/index.htmlindex 6d74ca92..6ec8b34e 100644--- a/animations/07-ambient-background/flow-field/index.html+++ b/animations/07-ambient-background/flow-field/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Flow Field</title>+ <title>Flow Field — Animation Handbook</title>+ <meta name="description" content="Particles ride a vector field sampled from inline pseudo-noise, leaving fading trails that map the invisible currents.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/flow-field/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Flow Field — Animation Handbook">+ <meta property="og:description" content="Particles ride a vector field sampled from inline pseudo-noise, leaving fading trails that map the invisible currents.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/flow-field/">+ <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="Flow Field — Animation Handbook">+ <meta name="twitter:description" content="Particles ride a vector field sampled from inline pseudo-noise, leaving fading trails that map the invisible currents.">+ <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": "Flow Field", "name": "Flow Field", "description": "Particles ride a vector field sampled from inline pseudo-noise, leaving fading trails that map the invisible currents.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/flow-field/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Flow Field"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}@@ -30,8 +44,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){.fps-badge{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../particle-constellation/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../synthwave-grid/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/flow-field/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Flow Field</h1><p>Particles ride a vector field sampled from inline pseudo-noise, leaving fading trails that map the invisible currents.</p>@@ -133,5 +161,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused){lastT=performance.now();raf=requestAnimationFrame(loop);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/grain-overlay/index.html b/animations/07-ambient-background/grain-overlay/index.htmlindex c7552d52..d9a62241 100644--- a/animations/07-ambient-background/grain-overlay/index.html+++ b/animations/07-ambient-background/grain-overlay/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Grain / Film Noise Overlay</title>+ <title>Grain / Film Noise Overlay — Animation Handbook</title>+ <meta name="description" content="Animated noise texture adds cinematic warmth — subtlety is everything. 5–10% opacity, not 30%.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/grain-overlay/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Grain / Film Noise Overlay — Animation Handbook">+ <meta property="og:description" content="Animated noise texture adds cinematic warmth — subtlety is everything. 5–10% opacity, not 30%.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/grain-overlay/">+ <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="Grain / Film Noise Overlay — Animation Handbook">+ <meta name="twitter:description" content="Animated noise texture adds cinematic warmth — subtlety is everything. 5–10% opacity, not 30%.">+ <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": "Grain / Film Noise Overlay", "name": "Grain / Film Noise Overlay", "description": "Animated noise texture adds cinematic warmth — subtlety is everything. 5–10% opacity, not 30%.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/grain-overlay/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Grain / Film Noise Overlay"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -47,8 +61,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:auto}.stage{flex:none;height:auto;min-height:400px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../aurora/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../scanline/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/grain-overlay/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Grain / Film Noise Overlay</h1><p>Animated noise texture adds cinematic warmth — subtlety is everything. 5–10% opacity, not 30%.</p>@@ -163,5 +191,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused){lastT=performance.now();raf=requestAnimationFrame(loop);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/grid-dot-pattern-parallax/index.html b/animations/07-ambient-background/grid-dot-pattern-parallax/index.htmlindex a0930d0d..97912f49 100644--- a/animations/07-ambient-background/grid-dot-pattern-parallax/index.html+++ b/animations/07-ambient-background/grid-dot-pattern-parallax/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Grid / Dot Pattern Parallax</title>+ <title>Grid / Dot Pattern Parallax — Animation Handbook</title>+ <meta name="description" content="Subtle background pattern translates opposite to mouse movement — imperceptible depth, very effective.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/grid-dot-pattern-parallax/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Grid / Dot Pattern Parallax — Animation Handbook">+ <meta property="og:description" content="Subtle background pattern translates opposite to mouse movement — imperceptible depth, very effective.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/grid-dot-pattern-parallax/">+ <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="Grid / Dot Pattern Parallax — Animation Handbook">+ <meta name="twitter:description" content="Subtle background pattern translates opposite to mouse movement — imperceptible depth, very effective.">+ <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": "Grid / Dot Pattern Parallax", "name": "Grid / Dot Pattern Parallax", "description": "Subtle background pattern translates opposite to mouse movement — imperceptible depth, very effective.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/grid-dot-pattern-parallax/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Grid / Dot Pattern Parallax"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -69,8 +83,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:420px}.stage{flex:none}}@media(prefers-reduced-motion:reduce){.pattern-layer{transition:none!important}.auto-drift{animation-duration:300s!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../floating-elements/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../abstract-geometric-motion/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/grid-dot-pattern-parallax/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Grid / Dot Pattern Parallax</h1><p>Subtle background pattern translates opposite to mouse movement — imperceptible depth, very effective.</p>@@ -173,5 +201,6 @@document.getElementById('layer2-tog').addEventListener('change',e=>{layer2.style.display=e.target.checked?'block':'none';});document.getElementById('spot-tog').addEventListener('change',e=>{spotOn=e.target.checked;if(!spotOn)spotlight.style.opacity='0';});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/light-leak/index.html b/animations/07-ambient-background/light-leak/index.htmlindex 87d384d6..bce5e79a 100644--- a/animations/07-ambient-background/light-leak/index.html+++ b/animations/07-ambient-background/light-leak/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Light Leak</title>+ <title>Light Leak — Animation Handbook</title>+ <meta name="description" content="Warm light sweeps across the scene with random irregular timing — evoking accidental film camera flares.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/light-leak/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Light Leak — Animation Handbook">+ <meta property="og:description" content="Warm light sweeps across the scene with random irregular timing — evoking accidental film camera flares.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/light-leak/">+ <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="Light Leak — Animation Handbook">+ <meta name="twitter:description" content="Warm light sweeps across the scene with random irregular timing — evoking accidental film camera flares.">+ <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": "Light Leak", "name": "Light Leak", "description": "Warm light sweeps across the scene with random irregular timing — evoking accidental film camera flares.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/light-leak/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Light Leak"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -56,8 +70,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:420px}}@media(prefers-reduced-motion:reduce){.leak{transition:none!important}.bokeh{animation-duration:60s!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../scanline/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../starfield/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/light-leak/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Light Leak</h1><p>Warm light sweeps across the scene with random irregular timing — evoking accidental film camera flares.</p>@@ -170,5 +198,6 @@applyColor();scheduleNext();</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/matrix-rain/README.md b/animations/07-ambient-background/matrix-rain/README.mdnew file mode 100644index 00000000..0a7df38c--- /dev/null+++ b/animations/07-ambient-background/matrix-rain/README.md@@ -0,0 +1,51 @@+# Matrix Rain++## What it is+Matrix rain — also called "digital rain" — is an ambient background of vertical columns of characters falling down a dark surface. The leading glyph in each column is bright, and the characters behind it fade toward black, giving the impression of a glowing head trailing a tail. It became a cultural shorthand for "computers doing something" after appearing in *The Matrix* (1999), and is drawn on a `<canvas>` because the per-frame character churn is too heavy for the DOM.++## When to use it+- Terminal, hacker, or "system online" themed landing pages and hero sections+- Loading and boot screens for retro-futuristic or cyberpunk interfaces+- Decorative backdrops behind login panels, 404 pages, or event countdowns+- Music visualizers and demo-scene style ambient loops++## How it works+Each column tracks a single vertical position (its "drop"). Every step, the column draws a fresh bright character at its head, then advances one row. The trail is not stored — it is produced by painting a translucent black rectangle over the entire canvas each frame, which darkens every previously drawn glyph a little more until it disappears:++```js+// Fade the whole canvas slightly instead of clearing it.+ctx.fillStyle = 'rgba(0,0,0,' + FADE + ')'; // FADE ~0.07+ctx.fillRect(0, 0, W, H);++const pitch = W / cols;+for (let i = 0; i < cols; i++) {+ const x = i * pitch, y = drops[i] * fontSize;+ ctx.fillStyle = '#d8ffe6'; // bright leader+ ctx.fillText(pick(), x, y);+ if (y > H && Math.random() > 0.975) drops[i] = 0; // recycle randomly+ drops[i]++; // fall one row+}+```++Because the canvas is never fully cleared, the length of the tail is entirely controlled by the fade opacity: a smaller value leaves glyphs on screen longer (a long tail), a larger value wipes them quickly (a short tail). Columns reset to the top at random once they pass the bottom, so the rain never falls in lockstep.++## Key parameters+| Parameter | Default | Effect |+|-----------|---------|--------|+| Speed | 8 | Steps per second scalar. Low = slow drizzle; high = dense downpour |+| Font size | 16px | Glyph size; also sets column width, so larger = fewer columns |+| Trail fade | 0.07 | Per-frame black opacity. 0.02 = long ghostly tails; 0.20 = short crisp heads |+| Character set | Katakana | Katakana (classic), Binary (0/1), or Hex (0–F) |+| Leader glow | on | `shadowBlur` halo on the head glyph for a phosphor bloom |++## Production notes+- **`fillRect` fade vs `clearRect`**: clearing the canvas each frame gives no trail — you would have to store and redraw every past glyph yourself. Painting a translucent `fillRect` is both the trail mechanism and cheaper, since it is one composited rectangle instead of hundreds of retained cells.+- **Cap density on mobile**: column count is derived from a minimum pixel pitch, not an unbounded `width / fontSize`. Combined with clamping `devicePixelRatio` to 2, this keeps the per-frame `fillText` count bounded so the effect holds 60fps on mid-range phones. Heavy `shadowBlur` is the most expensive part — it is applied only to the single leader glyph, never the trail.+- **Pause on hidden tab**: the `requestAnimationFrame` loop is cancelled on `visibilitychange` when `document.hidden` is true and restarted when the tab returns, so a background tab burns no CPU or battery.+- **Reduced motion**: under `prefers-reduced-motion: reduce` the animation loop never starts — a single static frame is rendered once so the effect is still legible without any movement.+- **It is decorative**: real usage should sit behind content with `aria-hidden="true"`, `pointer-events: none`, and enough contrast on the foreground text that the rain does not reduce readability. Treat it as texture, not information.++## See also+- [Starfield](../starfield/) — canvas particle field with parallax depth+- [Scanline](../scanline/) — CRT line overlay for the same retro-terminal mood+- [Synthwave Grid](../synthwave-grid/) — perspective neon grid for cyberpunk backdropsdiff --git a/animations/07-ambient-background/matrix-rain/index.html b/animations/07-ambient-background/matrix-rain/index.htmlnew file mode 100644index 00000000..1b2682fc--- /dev/null+++ b/animations/07-ambient-background/matrix-rain/index.html@@ -0,0 +1,188 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Matrix Rain — Animation Handbook</title>+ <meta name="description" content="Columns of glowing characters fall down a dark canvas — bright leaders, fading trails.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/matrix-rain/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Matrix Rain — Animation Handbook">+ <meta property="og:description" content="Columns of glowing characters fall down a dark canvas — bright leaders, fading trails.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/matrix-rain/">+ <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="Matrix Rain — Animation Handbook">+ <meta name="twitter:description" content="Columns of glowing characters fall down a dark canvas — bright leaders, fading trails.">+ <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": "Matrix Rain", "name": "Matrix Rain", "description": "Columns of glowing characters fall down a dark canvas — bright leaders, fading trails.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/matrix-rain/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Matrix Rain"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#5fd88a;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--stage-h:620px}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(11px,1.8vw,15px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ .stage{height:var(--stage-h);border:1px solid var(--ui-border);border-radius:8px;overflow:hidden;position:relative;background:#000}+ canvas{display:block;width:100%;height:100%}+ .fps-badge{position:absolute;top:8px;right:8px;font-size:9px;color:rgba(255,255,255,.4);background:rgba(0,0,0,.5);padding:3px 8px;border-radius:4px;pointer-events:none}+ aside{width:clamp(200px,22vw,240px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+ .div{height:1px;background:var(--ui-border)}+ .sr{display:flex;align-items:center;gap:6px;font-size:10px}+ .sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+ .sv{width:40px;text-align:right;color:var(--ui-text)}+ select{background:var(--ui-bg);border:1px solid var(--ui-border);color:var(--ui-text);font-family:monospace;font-size:10px;padding:8px 6px;border-radius:4px;width:100%;min-height:44px}+ .tog{display:flex;align-items:center;gap:8px;font-size:10px;cursor:pointer;min-height:44px}+ .tog input{accent-color:var(--ui-accent);width:16px;height:16px;flex-shrink:0}+ button.rst{background:transparent;border:1px solid var(--ui-border);color:var(--ui-text);font-family:monospace;font-size:10px;padding:14px 8px;border-radius:4px;cursor:pointer;width:100%}+ @media(hover:hover){button.rst:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}+ @media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../synthwave-grid/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../plasma/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/matrix-rain/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Matrix Rain</h1>+ <p>Columns of glowing characters fall down a dark canvas — bright leaders, fading trails.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage" id="stage">+ <canvas id="cvs"></canvas>+ <div class="fps-badge" id="fps">— fps</div>+ </div>+ </div>+ <aside>+ <p class="note">Each column drops one bright character per step. A translucent black rectangle painted every frame fades old characters into the trail — never cleared, so the tail length is a function of the fade opacity.</p>+ <div class="lbl">Speed</div>+ <div class="sr"><input type="range" id="spd-sl" min="1" max="20" value="8" step="1"><span class="sv" id="spd-v">8</span></div>+ <div class="lbl">Font size</div>+ <div class="sr"><input type="range" id="fs-sl" min="10" max="28" value="16" step="2"><span class="sv" id="fs-v">16</span></div>+ <div class="lbl">Trail fade</div>+ <div class="sr"><input type="range" id="fade-sl" min="2" max="20" value="7" step="1"><span class="sv" id="fade-v">.07</span></div>+ <div class="lbl">Characters</div>+ <select id="set-sel">+ <option value="kana" selected>Katakana</option>+ <option value="bin">Binary</option>+ <option value="hex">Hexadecimal</option>+ </select>+ <label class="tog"><input type="checkbox" id="glow-tog" checked><span>Leader glow</span></label>+ <div class="div"></div>+ <div style="font-size:9px;color:var(--ui-muted)" id="fps-note">FPS: <span id="fps2">—</span></div>+ <button class="rst" id="pause-btn">⏸ Pause</button>+ </aside>+</div>+<script>+const cvs=document.getElementById('cvs'),ctx=cvs.getContext('2d');+const stage=document.getElementById('stage');+const fpsEl=document.getElementById('fps'),fps2=document.getElementById('fps2');+const reduced=window.matchMedia('(prefers-reduced-motion: reduce)').matches;+const SETS={+ kana:'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワ0123456789',+ bin:'01',+ hex:'0123456789ABCDEF'+};+let W,H,dpr=1,cols=0,drops=[],fontSize=16;+let paused=false,raf=null,lastT=0,acc=0;+let SPD=8,FADE=.07,SET='kana',GLOW=true;++function resize(){+ dpr=Math.min(window.devicePixelRatio||1,2);+ const cw=stage.clientWidth,ch=stage.clientHeight;+ cvs.width=Math.round(cw*dpr);cvs.height=Math.round(ch*dpr);+ W=cw;H=ch;+ ctx.setTransform(dpr,0,0,dpr,0,0);+ // Cap columns on small screens: enforce a minimum column pitch.+ const pitch=Math.max(fontSize,W<600?14:11);+ cols=Math.floor(W/pitch);+ drops=Array.from({length:cols},()=>Math.floor(Math.random()*-H/fontSize));+ ctx.fillStyle='#000';ctx.fillRect(0,0,W,H);+}++function pick(){const s=SETS[SET];return s[Math.floor(Math.random()*s.length)];}++function step(){+ // Translucent fade: paint semi-opaque black over the whole canvas each frame+ // so previously drawn glyphs decay into the trail instead of being cleared.+ ctx.fillStyle='rgba(0,0,0,'+FADE+')';+ ctx.fillRect(0,0,W,H);+ ctx.font=fontSize+'px '+getComputedStyle(document.body).getPropertyValue('--mono');+ ctx.textBaseline='top';+ const pitch=W/cols;+ for(let i=0;i<cols;i++){+ const x=i*pitch,y=drops[i]*fontSize;+ if(GLOW){ctx.shadowColor='#5fd88a';ctx.shadowBlur=8;}else{ctx.shadowBlur=0;}+ ctx.fillStyle='#d8ffe6';ctx.fillText(pick(),x,y); // bright leader+ ctx.shadowBlur=0;+ ctx.fillStyle='#3aa564';ctx.fillText(pick(),x,y-fontSize); // dimmer follower+ if(y>H&&Math.random()>.975)drops[i]=Math.floor(Math.random()*-20);+ drops[i]++;+ }+}++function loop(ts){+ if(paused){raf=null;return;}+ raf=requestAnimationFrame(loop);+ const dt=ts-lastT;+ const f=Math.round(1000/(dt||16));fpsEl.textContent=f+' fps';fps2.textContent=f;+ // Advance the rain at a rate independent of the display's refresh rate.+ acc+=dt;const interval=1000/(SPD*3.5);+ if(acc>=interval){acc=acc%interval;lastT=ts;step();}+ else lastT=ts;+}++function start(){+ resize();+ if(reduced){step();fpsEl.textContent='static';fps2.textContent='—';return;}+ lastT=performance.now();raf=requestAnimationFrame(loop);+}++let rzT;+window.addEventListener('resize',()=>{clearTimeout(rzT);rzT=setTimeout(()=>{resize();if(reduced)step();},150);});+if('ResizeObserver'in window)new ResizeObserver(()=>{}).observe(stage);++document.addEventListener('visibilitychange',()=>{+ if(reduced)return;+ if(document.hidden){if(raf)cancelAnimationFrame(raf);raf=null;}+ else if(!paused&&!raf){lastT=performance.now();raf=requestAnimationFrame(loop);}+});++document.getElementById('spd-sl').addEventListener('input',e=>{SPD=+e.target.value;document.getElementById('spd-v').textContent=SPD;});+document.getElementById('fs-sl').addEventListener('input',e=>{fontSize=+e.target.value;document.getElementById('fs-v').textContent=fontSize;resize();if(reduced)step();});+document.getElementById('fade-sl').addEventListener('input',e=>{FADE=e.target.value/100;document.getElementById('fade-v').textContent=FADE.toFixed(2).replace('0.','.');});+document.getElementById('set-sel').addEventListener('change',e=>{SET=e.target.value;});+document.getElementById('glow-tog').addEventListener('change',e=>{GLOW=e.target.checked;});+document.getElementById('pause-btn').addEventListener('click',()=>{+ if(reduced)return;+ paused=!paused;document.getElementById('pause-btn').textContent=paused?'▶ Resume':'⏸ Pause';+ if(!paused&&!raf){lastT=performance.now();raf=requestAnimationFrame(loop);}+});++start();+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/07-ambient-background/mesh-gradient/index.html b/animations/07-ambient-background/mesh-gradient/index.htmlindex 2c0f1fbf..aa432e18 100644--- a/animations/07-ambient-background/mesh-gradient/index.html+++ b/animations/07-ambient-background/mesh-gradient/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Mesh Gradient Animation</title>+ <title>Mesh Gradient Animation — Animation Handbook</title>+ <meta name="description" content="Blurred radial gradients drift slowly — heavy blur dissolves edges into pure organic color washes.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/mesh-gradient/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Mesh Gradient Animation — Animation Handbook">+ <meta property="og:description" content="Blurred radial gradients drift slowly — heavy blur dissolves edges into pure organic color washes.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/mesh-gradient/">+ <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="Mesh Gradient Animation — Animation Handbook">+ <meta name="twitter:description" content="Blurred radial gradients drift slowly — heavy blur dissolves edges into pure organic color washes.">+ <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": "Mesh Gradient Animation", "name": "Mesh Gradient Animation", "description": "Blurred radial gradients drift slowly — heavy blur dissolves edges into pure organic color washes.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/mesh-gradient/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Mesh Gradient Animation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -46,8 +60,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:420px}.stage{flex:none}}@media(prefers-reduced-motion:reduce){.blob{animation-duration:300s!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../animated-gradient-background/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../aurora/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/mesh-gradient/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Mesh Gradient Animation</h1><p>Blurred radial gradients drift slowly — heavy blur dissolves edges into pure organic color washes.</p>@@ -133,5 +161,6 @@// Show 4 blobs by defaultdocument.getElementById('b5').style.display='none';</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/particle-constellation/index.html b/animations/07-ambient-background/particle-constellation/index.htmlindex ea76c348..729e15ee 100644--- a/animations/07-ambient-background/particle-constellation/index.html+++ b/animations/07-ambient-background/particle-constellation/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Particle Constellation</title>+ <title>Particle Constellation — Animation Handbook</title>+ <meta name="description" content="Drifting nodes link to nearby neighbors — line opacity fades with distance, building a living network mesh.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/particle-constellation/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Particle Constellation — Animation Handbook">+ <meta property="og:description" content="Drifting nodes link to nearby neighbors — line opacity fades with distance, building a living network mesh.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/particle-constellation/">+ <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="Particle Constellation — Animation Handbook">+ <meta name="twitter:description" content="Drifting nodes link to nearby neighbors — line opacity fades with distance, building a living network mesh.">+ <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": "Particle Constellation", "name": "Particle Constellation", "description": "Drifting nodes link to nearby neighbors — line opacity fades with distance, building a living network mesh.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/particle-constellation/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Particle Constellation"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}@@ -32,8 +46,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){.fps-badge{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../abstract-geometric-motion/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../flow-field/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/particle-constellation/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Particle Constellation</h1><p>Drifting nodes link to nearby neighbors — line opacity fades with distance, building a living network mesh.</p>@@ -144,5 +172,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused){lastT=performance.now();raf=requestAnimationFrame(loop);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/plasma/README.md b/animations/07-ambient-background/plasma/README.mdnew file mode 100644index 00000000..ea8b5874--- /dev/null+++ b/animations/07-ambient-background/plasma/README.md@@ -0,0 +1,75 @@+# Plasma Field++## What it is++Plasma is the classic demoscene background effect: a smoothly shifting field of+colour with no hard edges, generated entirely from maths rather than an image or+video. Every pixel's colour comes from summing a few sine waves of its x and y+position plus a time offset, so the whole field breathes and flows in a loop.++## When to use it++- Ambient hero or section backgrounds that need motion without competing with foreground content.+- Loading and idle states where a living surface reads better than a static gradient.+- Music, creative-coding, or retro-themed sites where the demoscene lineage fits.+- Any place you want organic movement but cannot ship a video file.++## How it works++Each pixel gets a scalar value from a sum of sines — some of the position, some+of time — and that value indexes a colour palette. Computing this per pixel at+full resolution is expensive, so the field is rendered into a small offscreen+buffer (around 96–200px wide) and then scaled up onto the visible canvas with+image smoothing on. The upscale blur is free and actually helps the plasma look+softer.++```js+// low-res buffer, one pixel at a time+const v = Math.sin(x*f + t) // horizontal wave+ + Math.sin(y*f + t*1.3) // vertical wave+ + Math.sin((x+y)*f*0.5 + t*0.7) // diagonal wave+ + Math.sin(dist*f + t*1.1); // radial wave from centre+const idx = ((v + 4) * 31.875) | 0; // v ∈ [-4,4] → palette index 0..255+data[o++] = lut[idx*3]; data[o++] = lut[idx*3+1]; data[o++] = lut[idx*3+2]; data[o++] = 255;++bctx.putImageData(img, 0, 0); // write the tiny buffer+vctx.drawImage(buf, 0, 0, bw, bh, 0, 0, view.width, view.height); // scale up smooth+```++The palette is a 256-entry lookup table built once with an Inigo Quilez cosine+gradient, so changing palettes is just swapping the table — no per-pixel colour+maths.++## Key parameters++| Parameter | What it controls | Notes |+|---|---|---|+| `speed` | How fast the time offset `t` advances | 0 freezes the field; ~1× is a calm drift |+| `scale` / `f` | Radians of wave per pixel | Higher = tighter, busier pattern; lower = broad soft blobs |+| `palette` | The colour lookup table | Neon / sunset / ocean / mono, each a cosine gradient |+| `quality` | Buffer width in pixels | 96 (cheap) to 200 (crisper); height follows the stage aspect |+| `dpr cap` | Backing-store resolution of the view canvas | Capped at 1.5 so upscaling stays cheap |++## Production notes++- The low-res buffer is the whole trick. A per-pixel `putImageData` over the full+ canvas at device resolution will drop frames on mobile; a ~140px buffer upscaled+ with `drawImage` keeps the work at a few thousand pixels per frame.+- Precompute what you can: the radial distance of each pixel and the per-row and+ per-column sines only need recomputing when size or zoom changes, leaving one+ sine per pixel in the inner loop.+- Do colour through a palette lookup table, not live RGB maths per pixel.+- Pause the `requestAnimationFrame` loop on `visibilitychange` when the tab is+ hidden so a background tab does no work.+- Respect `prefers-reduced-motion`: render a single static frame and never start+ the loop.+- The effect is decorative — mark the canvas `aria-hidden` and keep real content+ in the DOM above it.+- For the real thing, move the sum-of-sines into a WebGL fragment shader. The GPU+ runs it per pixel at full resolution for free, and you drop the upscale entirely.++## See also++- [Animated Gradient Background](../animated-gradient-background/)+- [Mesh Gradient](../mesh-gradient/)+- [Aurora](../aurora/)diff --git a/animations/07-ambient-background/plasma/index.html b/animations/07-ambient-background/plasma/index.htmlnew file mode 100644index 00000000..097274ad--- /dev/null+++ b/animations/07-ambient-background/plasma/index.html@@ -0,0 +1,194 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Plasma Field — Animation Handbook</title>+ <meta name="description" content="The demoscene plasma: color fields generated by summing sine waves of x, y, and time on a canvas.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/plasma/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Plasma Field — Animation Handbook">+ <meta property="og:description" content="The demoscene plasma: color fields generated by summing sine waves of x, y, and time on a canvas.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/plasma/">+ <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="Plasma Field — Animation Handbook">+ <meta name="twitter:description" content="The demoscene plasma: color fields generated by summing sine waves of x, y, and time on a canvas.">+ <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": "Plasma Field", "name": "Plasma Field", "description": "The demoscene plasma: color fields generated by summing sine waves of x, y, and time on a canvas.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/plasma/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Plasma Field"}</script>+ <style>+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}+ :root{--bg:#0b0b0d;--ui-bg:#111114;--ui-border:rgba(255,255,255,.09);--ui-accent:#ff6f8b;--ui-text:#f4f4f2;--ui-muted:#77777e;--disp:'Bricolage','Arial Narrow',sans-serif;--mono:'PlexMono',ui-monospace,Menlo,Consolas,monospace;--stage-h:min(64vh,600px)}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--ui-text);font-family:var(--mono);-webkit-font-smoothing:antialiased;padding:clamp(12px,3vw,24px)}+ header{margin-bottom:20px}+ header h1{font-family:var(--disp);font-weight:700;font-size:clamp(11px,1.8vw,15px);letter-spacing:-.01em}+ header p{font-size:clamp(10px,1.2vw,12px);color:var(--ui-muted);margin-top:4px}+ .layout{display:flex;gap:clamp(12px,2vw,24px);align-items:flex-start}+ .stage-wrap{flex:1;min-width:0}+ .stage{width:100%;height:var(--stage-h);border:1px solid var(--ui-border);border-radius:8px;overflow:hidden;position:relative;background:#000}+ .stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block}+ aside{width:clamp(200px,22vw,240px);flex-shrink:0;background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px}+ .note{font-size:10px;color:var(--ui-muted);line-height:1.6;border-left:2px solid var(--ui-accent);padding-left:8px}+ .lbl{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--ui-accent)}+ .div{height:1px;background:var(--ui-border)}+ .sr{display:flex;align-items:center;gap:6px;font-size:10px}+ .sr input[type=range]{flex:1;accent-color:var(--ui-accent);min-height:44px}+ .sv{width:46px;text-align:right;color:var(--ui-text)}+ select{background:var(--ui-bg);border:1px solid var(--ui-border);color:var(--ui-text);font-family:var(--mono);font-size:10px;padding:8px 6px;border-radius:4px;width:100%;min-height:44px}+ button.rst{background:transparent;border:1px solid var(--ui-border);color:var(--ui-text);font-family:var(--mono);font-size:10px;padding:14px 8px;border-radius:4px;cursor:pointer;width:100%}+ @media(hover:hover){button.rst:hover{border-color:var(--ui-accent);color:var(--ui-accent)}}+ @media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:52vh}}+ </style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style>+</head>+<body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../matrix-rain/" rel="prev" title="Previous">‹ Prev</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/plasma/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div>+<header>+ <h1>Plasma Field</h1>+ <p>The demoscene plasma: color fields generated by summing sine waves of x, y, and time on a canvas.</p>+</header>+<div class="layout">+ <div class="stage-wrap">+ <div class="stage" id="stage"><canvas id="c" aria-hidden="true"></canvas></div>+ </div>+ <aside>+ <p class="note">A low-resolution buffer is computed pixel by pixel from a sum of sines, then scaled up smoothly so the whole field stays cheap enough to run on a phone.</p>+ <div class="lbl">Speed</div>+ <div class="sr"><input type="range" id="spd" min="0" max="200" value="100" step="5"><span class="sv" id="spd-v">1.0×</span></div>+ <div class="lbl">Scale / Zoom</div>+ <div class="sr"><input type="range" id="scl" min="30" max="200" value="100" step="5"><span class="sv" id="scl-v">1.0×</span></div>+ <div class="lbl">Palette</div>+ <select id="pal">+ <option value="neon" selected>Neon</option>+ <option value="sunset">Sunset</option>+ <option value="ocean">Ocean</option>+ <option value="mono">Mono</option>+ </select>+ <div class="lbl">Quality</div>+ <select id="qual">+ <option value="96">Low (96px)</option>+ <option value="140" selected>Medium (140px)</option>+ <option value="200">High (200px)</option>+ </select>+ <div class="div"></div>+ <button class="rst" id="pause">⏸ Pause</button>+ </aside>+</div>+<script>+ const stage=document.getElementById('stage');+ const view=document.getElementById('c');+ const vctx=view.getContext('2d');+ const reduce=matchMedia('(prefers-reduced-motion: reduce)').matches;++ // Inigo Quilez cosine palettes: color = a + b*cos(2π(c*t + d))+ const PALETTES={+ neon: {a:[.5,.5,.5], b:[.5,.5,.5], c:[1,1,1], d:[.00,.33,.67]},+ sunset:{a:[.62,.4,.42],b:[.42,.3,.3],c:[1,1,1], d:[.00,.12,.24]},+ ocean: {a:[.28,.5,.6],b:[.3,.38,.4],c:[1,1,1], d:[.5,.55,.62]},+ mono: {a:[.55,.35,.4],b:[.45,.28,.31],c:[1,1,1], d:[.0,.03,.05]}+ };+ function buildLUT(p){+ const lut=new Uint8ClampedArray(256*3);+ for(let i=0;i<256;i++){const t=i/255;+ for(let k=0;k<3;k++){+ const v=p.a[k]+p.b[k]*Math.cos(6.28318*(p.c[k]*t+p.d[k]));+ lut[i*3+k]=Math.max(0,Math.min(1,v))*255;+ }+ }+ return lut;+ }++ // Low-res offscreen buffer, upscaled onto the view canvas.+ const buf=document.createElement('canvas');+ const bctx=buf.getContext('2d');+ let bw=0,bh=0,img=null,dist=null,sinX=null,sinY=null,sinC=null;+ let lut=buildLUT(PALETTES.neon);+ let speed=1,scale=1,quality=140,paused=false;++ function resize(){+ const r=stage.getBoundingClientRect();+ const dpr=Math.min(window.devicePixelRatio||1,1.5);+ view.width=Math.max(1,Math.round(r.width*dpr));+ view.height=Math.max(1,Math.round(r.height*dpr));+ bw=quality;+ bh=Math.max(1,Math.round(quality*(r.height/r.width)));+ buf.width=bw;buf.height=bh;+ img=bctx.createImageData(bw,bh);+ dist=new Float32Array(bw*bh);+ const cx=bw/2,cy=bh/2;+ for(let y=0,p=0;y<bh;y++)for(let x=0;x<bw;x++,p++){+ const dx=x-cx,dy=y-cy;dist[p]=Math.sqrt(dx*dx+dy*dy);+ }+ sinX=new Float32Array(bw);sinY=new Float32Array(bh);sinC=new Float32Array(bw+bh);+ vctx.imageSmoothingEnabled=true;+ if(reduce)draw(0);+ }++ function draw(t){+ const f=0.09*scale; // radians per pixel — the zoom+ const data=img.data;+ for(let x=0;x<bw;x++)sinX[x]=Math.sin(x*f+t);+ for(let y=0;y<bh;y++)sinY[y]=Math.sin(y*f+t*1.3);+ for(let k=0;k<bw+bh;k++)sinC[k]=Math.sin(k*f*0.5+t*0.7);+ let p=0,o=0;+ for(let y=0;y<bh;y++){+ const sy=sinY[y];+ for(let x=0;x<bw;x++,p++){+ // sum of sines: two precomputed axes, a diagonal, and a radial term+ const v=sinX[x]+sy+sinC[x+y]+Math.sin(dist[p]*f+t*1.1);+ const idx=(((v+4)*31.875)|0)*3; // v ∈ [-4,4] → 0..255 → ×3 (rgb)+ data[o++]=lut[idx];data[o++]=lut[idx+1];data[o++]=lut[idx+2];data[o++]=255;+ }+ }+ bctx.putImageData(img,0,0);+ vctx.drawImage(buf,0,0,bw,bh,0,0,view.width,view.height);+ }++ let last=performance.now(),clock=0,raf=0;+ function loop(now){+ raf=requestAnimationFrame(loop);+ const dt=Math.min((now-last)/1000,0.05);last=now;+ if(!paused)clock+=dt*speed;+ draw(clock);+ }+ function start(){if(reduce)return;cancelAnimationFrame(raf);last=performance.now();raf=requestAnimationFrame(loop);}+ function stop(){cancelAnimationFrame(raf);raf=0;}++ // Controls+ const $=id=>document.getElementById(id);+ $('spd').addEventListener('input',e=>{speed=e.target.value/100;$('spd-v').textContent=speed.toFixed(1)+'×';});+ $('scl').addEventListener('input',e=>{scale=e.target.value/100;$('scl-v').textContent=scale.toFixed(1)+'×';if(reduce)draw(clock);});+ $('pal').addEventListener('change',e=>{lut=buildLUT(PALETTES[e.target.value]);if(reduce)draw(clock);});+ $('qual').addEventListener('change',e=>{quality=+e.target.value;resize();});+ $('pause').addEventListener('click',()=>{+ paused=!paused;$('pause').textContent=paused?'▶ Resume':'⏸ Pause';+ });++ // Pause the loop when the tab is hidden+ document.addEventListener('visibilitychange',()=>{document.hidden?stop():start();});+ addEventListener('resize',resize);++ resize();+ start();+</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script>+</body>+</html>diff --git a/animations/07-ambient-background/scanline/index.html b/animations/07-ambient-background/scanline/index.htmlindex dd45d022..9aa7db5c 100644--- a/animations/07-ambient-background/scanline/index.html+++ b/animations/07-ambient-background/scanline/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Scanline Effect</title>+ <title>Scanline Effect — Animation Handbook</title>+ <meta name="description" content="Repeating dark lines over content create a CRT monitor aesthetic — optional sweep beam and phosphor glow.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/scanline/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Scanline Effect — Animation Handbook">+ <meta property="og:description" content="Repeating dark lines over content create a CRT monitor aesthetic — optional sweep beam and phosphor glow.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/scanline/">+ <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="Scanline Effect — Animation Handbook">+ <meta name="twitter:description" content="Repeating dark lines over content create a CRT monitor aesthetic — optional sweep beam and phosphor glow.">+ <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": "Scanline Effect", "name": "Scanline Effect", "description": "Repeating dark lines over content create a CRT monitor aesthetic — optional sweep beam and phosphor glow.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/scanline/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Scanline Effect"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -67,8 +81,22 @@@media(max-width:600px){.layout{flex-direction:column;align-items:stretch}aside{width:100%}:root{--stage-h:auto}.stage{flex:none;height:auto;min-height:420px}}@media(prefers-reduced-motion:reduce){.beam{animation-duration:60s!important}.term-cursor{animation:none!important}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../grain-overlay/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../light-leak/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/scanline/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Scanline Effect</h1><p>Repeating dark lines over content create a CRT monitor aesthetic — optional sweep beam and phosphor glow.</p>@@ -142,5 +170,6 @@document.getElementById('pause-btn').textContent=paused?'▶ Resume':'⏸ Pause';});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/starfield/index.html b/animations/07-ambient-background/starfield/index.htmlindex e95a32c2..203094ab 100644--- a/animations/07-ambient-background/starfield/index.html+++ b/animations/07-ambient-background/starfield/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Starfield / Space Particles</title>+ <title>Starfield / Space Particles — Animation Handbook</title>+ <meta name="description" content="Stars drift outward from center with parallax depth — slower near center, faster at edges.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/starfield/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Starfield / Space Particles — Animation Handbook">+ <meta property="og:description" content="Stars drift outward from center with parallax depth — slower near center, faster at edges.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/starfield/">+ <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="Starfield / Space Particles — Animation Handbook">+ <meta name="twitter:description" content="Stars drift outward from center with parallax depth — slower near center, faster at edges.">+ <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": "Starfield / Space Particles", "name": "Starfield / Space Particles", "description": "Stars drift outward from center with parallax depth — slower near center, faster at edges.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/starfield/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Starfield / Space Particles"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}@@ -38,8 +52,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){canvas{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../light-leak/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../breathing-glow/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/starfield/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Starfield / Space Particles</h1><p>Stars drift outward from center with parallax depth — slower near center, faster at edges.</p>@@ -171,5 +199,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused){lastT=performance.now();raf=requestAnimationFrame(loop);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/animations/07-ambient-background/synthwave-grid/index.html b/animations/07-ambient-background/synthwave-grid/index.htmlindex b44e2ce3..82512885 100644--- a/animations/07-ambient-background/synthwave-grid/index.html+++ b/animations/07-ambient-background/synthwave-grid/index.html@@ -3,7 +3,21 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Synthwave Grid</title>+ <title>Synthwave Grid — Animation Handbook</title>+ <meta name="description" content="A neon perspective grid scrolls toward the viewer under a gradient sky and glowing sun — the retro-futurist loop.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/synthwave-grid/">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Synthwave Grid — Animation Handbook">+ <meta property="og:description" content="A neon perspective grid scrolls toward the viewer under a gradient sky and glowing sun — the retro-futurist loop.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/synthwave-grid/">+ <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="Synthwave Grid — Animation Handbook">+ <meta name="twitter:description" content="A neon perspective grid scrolls toward the viewer under a gradient sky and glowing sun — the retro-futurist loop.">+ <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": "Synthwave Grid", "name": "Synthwave Grid", "description": "A neon perspective grid scrolls toward the viewer under a gradient sky and glowing sun — the retro-futurist loop.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/synthwave-grid/", "inLanguage": "en", "articleSection": "Ambient & Background", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, Ambient & Background, Synthwave Grid"}</script><style>@font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}@@ -31,8 +45,22 @@@media(max-width:600px){.layout{flex-direction:column}aside{width:100%}:root{--stage-h:380px}}@media(prefers-reduced-motion:reduce){.fps-badge{display:none}}</style>+<style id="ah-inject">+:root{--ah-bg:rgba(17,17,20,.82);--ah-line:rgba(255,255,255,.1);--ah-ink:#f4f4f2;--ah-muted:#9a9aa2;--ah-accent:#6ea8ff}+body{padding-top:46px}+.ah-bar{position:fixed;top:0;left:0;right:0;height:46px;z-index:2147483000;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(10px,3vw,18px);background:var(--ah-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--ah-line);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;box-sizing:border-box}+.ah-bar a,.ah-bar button{color:var(--ah-muted);text-decoration:none;background:none;border:0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 7px;border-radius:6px;transition:color .18s,background .18s;white-space:nowrap}+.ah-bar a:hover,.ah-bar button:hover{color:var(--ah-ink)}+.ah-home{color:var(--ah-ink);font-weight:600}+.ah-actions{display:flex;align-items:center;gap:2px}+.ah-sep{width:1px;height:16px;background:var(--ah-line);margin:0 4px}+.ah-copied{color:var(--ah-accent)!important}+@media(max-width:600px){.ah-hideSm{display:none}}+@media print{.ah-bar{display:none}body{padding-top:0}}+</style></head><body>+<div class="ah-bar" role="navigation" aria-label="Animation Handbook"><a class="ah-home" href="../../../">← Animation Handbook</a><span class="ah-actions"><a class="ah-hideSm" href="../flow-field/" rel="prev" title="Previous">‹ Prev</a><a class="ah-hideSm" href="../matrix-rain/" rel="next" title="Next">Next ›</a><span class="ah-sep ah-hideSm"></span><button type="button" id="ah-copy" class="ah-hideSm">Copy source</button><a class="ah-hideSm" href="https://github.com/matinmonshizadeh/animation-handbook/blob/main/animations/07-ambient-background/synthwave-grid/index.html" target="_blank" rel="noopener noreferrer">Source ↗</a></span></div><header><h1>Synthwave Grid</h1><p>A neon perspective grid scrolls toward the viewer under a gradient sky and glowing sun — the retro-futurist loop.</p>@@ -127,5 +155,6 @@ document.getElementById('pause-btn').addEventListener('click',()=>{if(!paused){lastT=performance.now();raf=requestAnimationFrame(loop);}});</script>+<script>(function(){var b=document.getElementById("ah-copy");if(!b)return;b.addEventListener("click",function(){fetch(location.href).then(function(r){return r.text();}).catch(function(){return document.documentElement.outerHTML;}).then(function(t){return navigator.clipboard.writeText(t);}).then(function(){b.textContent="Copied!";b.classList.add("ah-copied");setTimeout(function(){b.textContent="Copy source";b.classList.remove("ah-copied");},1500);}).catch(function(){b.textContent="Copy failed";setTimeout(function(){b.textContent="Copy source";},1500);});});})();</script></body></html>diff --git a/docs/launch-kit.md b/docs/launch-kit.mdnew file mode 100644index 00000000..bdddf4a2--- /dev/null+++ b/docs/launch-kit.md@@ -0,0 +1,132 @@+# Launch kit — Animation Handbook++Everything needed to take the repo from 0 stars to a real launch. The website+quality is already there; this is the distribution layer. Work top to bottom.++---++## 1. Repo metadata (do this first — 5 minutes)++GitHub → repo **Settings** (or the ⚙️ next to "About" on the repo home page):++**Description:**+> A visual reference of 124 web animation techniques — scroll effects, page transitions, micro-interactions, text, 3D, and ambient backgrounds. Every entry is a live, dependency-free demo.++**Website:** `https://matinmonshizadeh.github.io/animation-handbook/`++**Topics (add all):**+`web-animation` `css-animation` `animation` `frontend` `web-development`+`javascript` `motion-design` `ui-animation` `scroll-animation` `microinteractions`+`webgl` `awesome` `reference` `no-dependencies` `github-pages`++If you install the GitHub CLI (`gh`) later, this is one command:++```bash+gh repo edit matinmonshizadeh/animation-handbook \+ --description "A visual reference of 124 web animation techniques — scroll effects, page transitions, micro-interactions, text, 3D, and ambient backgrounds. Every entry is a live, dependency-free demo." \+ --homepage "https://matinmonshizadeh.github.io/animation-handbook/" \+ --add-topic web-animation,css-animation,animation,frontend,web-development,javascript,motion-design,ui-animation,scroll-animation,microinteractions,webgl,awesome,reference,no-dependencies,github-pages+```++Also enable: **Discussions** (Settings → Features) — gives people a place to ask+and share, which drives return visits.++---++## 2. Verify SEO is live (after pushing)++- `https://matinmonshizadeh.github.io/animation-handbook/sitemap.xml` → should list 125 URLs+- `https://matinmonshizadeh.github.io/animation-handbook/robots.txt` → should load+- Submit the sitemap to **Google Search Console** (add the property, then Sitemaps → submit `sitemap.xml`).+- Test the social card at https://opengraph.xyz — paste the homepage URL, confirm the og-image shows.++---++## 3. Launch posts++Space these out over ~2 weeks; don't fire them all the same day. Lead every one+with a short screen-recording GIF of scrolling through the grid — the visual is+the hook.++### Show HN (news.ycombinator.com/submit)++**Title:**+> Show HN: Animation Handbook – 124 web animation techniques, each a live demo++**URL:** `https://matinmonshizadeh.github.io/animation-handbook/`++**First comment (post immediately after submitting):**+> I kept re-googling the same animation techniques and landing on either a+> library's marketing page or a CodePen with no explanation. So I built a+> reference: 124 techniques across scroll effects, page transitions,+> micro-interactions, text, 3D, and ambient backgrounds. Each one is a single+> self-contained HTML file — no build step, no framework, no dependencies — with+> a short README on the mechanic and the production gotchas. It's meant to teach+> the *technique*, so GSAP/Framer/Three only show up in "production notes," never+> as the subject. Everything runs offline. Feedback and PRs welcome.++### Reddit — r/webdev (Showoff Saturday) and r/Frontend++**Title:**+> I built a handbook of 124 web animation techniques — every entry is a live, dependency-free demo++**Body:**+> Reference site for web animation, organized into 7 categories (scroll, entrance/exit,+> page transitions, micro-interactions, text, 3D, ambient). Each technique is one+> standalone HTML file with live controls and a short writeup of how it works and+> what to watch for in production. No frameworks, no build, works offline.+> Live: <link> · Source: <repo> · MIT. Would love feedback on what's missing.++*(r/webdev restricts self-promo to "Showoff Saturday" — respect it.)*++### dev.to / Hashnode article++**Title:** `I catalogued 124 web animation techniques so you don't have to`++**Outline:**+1. The problem — animation knowledge is scattered across libraries and CodePens.+2. The approach — one technique, one file, teach the mechanic not the tool.+3. A tour of the 7 categories with 3–4 embedded GIFs.+4. Two or three techniques explained in depth (e.g. scroll-driven animations, view transitions API).+5. It's open source — how to contribute. Link the repo, ask for a star.++*(Canonical-link the article back to your site to avoid SEO cannibalization.)*++### X / Bluesky thread++> 1/ I built Animation Handbook — 124 web animation techniques, each a live demo+> you can open and read how it works. No dependencies, no build step. 🧵 <GIF>+>+> 2/ Scroll effects, page transitions, micro-interactions, kinetic type, WebGL,+> ambient backgrounds — 7 categories, all vanilla HTML/CSS/JS. <GIF>+>+> 3/ Every entry explains the *mechanic* and the production gotchas — not a+> library pitch. GSAP/Framer/Three only appear in "production notes."+>+> 4/ It's open source (MIT) and runs offline. Star it, fork it, add your own: <repo> · Live: <link>++Tag/DM accounts that curate frontend content (e.g. weekly newsletters, "awesome"+list maintainers). Ask to be added to relevant awesome-lists (awesome-css,+awesome-web-animation) via PR.++### Product Hunt++**Tagline:** `A live, dependency-free reference of 124 web animation techniques`+Schedule for a Tuesday–Thursday 12:01am PT. Line up 5–10 people to comment/upvote early.++---++## 4. Keep it alive++- Add 2–3 new techniques a month; each is a fresh thing to post about.+- Turn the "New technique" issues into a public roadmap (GitHub Projects).+- Respond to every issue/PR fast — early responsiveness is what converts+ drive-by visitors into contributors, and contributors bring stars.++---++## Realistic expectation++Quality is necessary but not sufficient. A strong Show HN + r/webdev + one good+article, each led with a GIF, is what moves this from 0 to hundreds of stars.+Without a deliberate launch it will stay near zero regardless of how good it is.diff --git a/docs/superpowers/plans/2026-05-19-parallax-depth-of-field.md b/docs/superpowers/plans/2026-05-19-parallax-depth-of-field.mdindex 12f38eec..b3dc1560 100644--- a/docs/superpowers/plans/2026-05-19-parallax-depth-of-field.md+++ b/docs/superpowers/plans/2026-05-19-parallax-depth-of-field.md@@ -444,7 +444,7 @@ git commit -m "feat: add parallax scroll and focal-plane blur to depth-of-field**Files:**- Modify: `index.html` (root)-The root `index.html` is currently nearly empty. Replace it with a proper atlas index page that links to the animation.+The root `index.html` is currently nearly empty. Replace it with a proper handbook index page that links to the animation.- [ ] **Step 1: Replace root index.html**@@ -454,7 +454,7 @@ The root `index.html` is currently nearly empty. Replace it with a proper atlas<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Animation Atlas</title>+ <title>Animation Handbook</title><style>:root { --bg: #060a10; --text: #c9d1d9; --muted: #8b949e; --accent: #58a6ff; --border: #21262d; }*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }@@ -469,7 +469,7 @@ The root `index.html` is currently nearly empty. Replace it with a proper atlas</style></head><body>- <h1>Animation Atlas</h1>+ <h1>Animation Handbook</h1><p class="subtitle">A visual reference of web animation techniques.</p><h2>01 — Scroll-Based</h2>@@ -486,7 +486,7 @@ The root `index.html` is currently nearly empty. Replace it with a proper atlas- [ ] **Step 2: Open root index.html in browser and verify**Open the root `index.html`. Expected:-- Dark page with "Animation Atlas" header+- Dark page with "Animation Handbook" header- One entry under "01 — Scroll-Based" linking to the animation- Clicking the link opens the animation demo@@ -494,7 +494,7 @@ Open the root `index.html`. Expected:```bashgit add index.html-git commit -m "feat: add root atlas index page with depth-of-field entry"+git commit -m "feat: add root handbook index page with depth-of-field entry"```---diff --git a/docs/superpowers/plans/2026-05-19-parallax-scrolling.md b/docs/superpowers/plans/2026-05-19-parallax-scrolling.mdindex 0647954b..08bdb5c3 100644--- a/docs/superpowers/plans/2026-05-19-parallax-scrolling.md+++ b/docs/superpowers/plans/2026-05-19-parallax-scrolling.md@@ -528,7 +528,7 @@ Open root `index.html`. Expected:```bashgit add index.html-git commit -m "feat: add parallax-scrolling to root atlas index"+git commit -m "feat: add parallax-scrolling to root handbook index"```---diff --git a/docs/superpowers/specs/2026-05-19-parallax-depth-of-field-design.md b/docs/superpowers/specs/2026-05-19-parallax-depth-of-field-design.mdindex 1e7625d9..e52f1c0d 100644--- a/docs/superpowers/specs/2026-05-19-parallax-depth-of-field-design.md+++ b/docs/superpowers/specs/2026-05-19-parallax-depth-of-field-design.md@@ -131,7 +131,7 @@ The sidebar IS the controls panel. No separate overlay. On mobile it becomes a h3. **How it works** — scroll progress → focal plane `f` → `blur = maxBlur × |d − f|` per layer4. **Key parameters** — `maxBlur`, per-layer `depth`, parallax speed ratios, `maxOffset`5. **Production notes** — GSAP ScrollTrigger equivalent; performance note on `filter:blur` (use `will-change: filter` or promote layers); avoid blurring too many large elements simultaneously-6. **See also** — links to other scroll-based entries (to be filled as atlas grows)+6. **See also** — links to other scroll-based entries (to be filled as handbook grows)---diff --git a/favicon.svg b/favicon.svgnew file mode 100644index 00000000..dfb6d51a--- /dev/null+++ b/favicon.svg@@ -0,0 +1,7 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">+ <rect width="32" height="32" rx="7" fill="#0b0b0d"/>+ <circle cx="16" cy="16" r="9" fill="none" stroke="#6ea8ff" stroke-width="2.4" stroke-dasharray="42 14" stroke-linecap="round">+ <animateTransform attributeName="transform" type="rotate" from="0 16 16" to="360 16 16" dur="3s" repeatCount="indefinite"/>+ </circle>+ <circle cx="16" cy="16" r="2.6" fill="#5fd88a"/>+</svg>diff --git a/index.html b/index.htmlindex 99c9e023..741c78ec 100644--- a/index.html+++ b/index.html@@ -3,8 +3,46 @@<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">-<title>Animation Handbook</title>-<script>document.documentElement.classList.add('js')</script>+<title>Animation Handbook — 124 Web Animation Techniques with Live Demos</title>+<meta name="description" content="A visual reference of 124 web animation techniques — scroll effects, page transitions, micro-interactions, text animation, 3D, and ambient backgrounds. Every entry is a live, dependency-free demo with an explanation of how it works.">+<meta name="keywords" content="web animation, CSS animation, animation examples, scroll animation, page transitions, micro-interactions, kinetic typography, WebGL, frontend animation reference, motion design, animation handbook">+<meta name="author" content="matinmonshizadeh">+<meta name="robots" content="index, follow, max-image-preview:large">+<meta name="theme-color" content="#0b0b0d">+<link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/">+<link rel="icon" type="image/svg+xml" href="favicon.svg">++<!-- Open Graph -->+<meta property="og:type" content="website">+<meta property="og:site_name" content="Animation Handbook">+<meta property="og:title" content="Animation Handbook — 124 Web Animation Techniques with Live Demos">+<meta property="og:description" content="A visual reference of 124 web animation techniques. Every entry is a live, dependency-free demo with an explanation of how it works.">+<meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/">+<meta property="og:image" content="https://matinmonshizadeh.github.io/animation-handbook/og-image.png">+<meta property="og:image:width" content="1200">+<meta property="og:image:height" content="630">++<!-- Twitter -->+<meta name="twitter:card" content="summary_large_image">+<meta name="twitter:title" content="Animation Handbook — 124 Web Animation Techniques">+<meta name="twitter:description" content="A visual reference of 124 web animation techniques. Every entry is a live, dependency-free demo you can open in the browser.">+<meta name="twitter:image" content="https://matinmonshizadeh.github.io/animation-handbook/og-image.png">++<!-- Structured data: parsed by search + AI answer engines -->+<script type="application/ld+json">+{+ "@context": "https://schema.org",+ "@type": "WebSite",+ "name": "Animation Handbook",+ "url": "https://matinmonshizadeh.github.io/animation-handbook/",+ "description": "A visual reference of 124 web animation techniques, each with a live, dependency-free demo and an explanation of how it works.",+ "inLanguage": "en",+ "author": { "@type": "Person", "name": "matinmonshizadeh" },+ "about": ["web animation", "CSS animation", "motion design", "frontend development"],+ "keywords": "web animation, CSS animation, scroll animation, page transitions, micro-interactions, kinetic typography, WebGL, motion design"+}+</script>+<script>document.documentElement.classList.add('js');(function(){try{var t=localStorage.getItem('ah-theme');if(!t)t=matchMedia('(prefers-color-scheme: light)').matches?'light':'dark';document.documentElement.dataset.theme=t;}catch(e){}})();</script><style>@font-face{font-family:'Bricolage';src:url('assets/fonts/brico-400.woff2') format('woff2');font-weight:400;font-display:swap}@font-face{font-family:'Bricolage';src:url('assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}@@ -21,6 +59,22 @@--mono:'PlexMono',ui-monospace,"Cascadia Mono",Menlo,Consolas,monospace;--ease:cubic-bezier(.22,1,.36,1);}+:root[data-theme="light"]{+ --bg:#f5f5f3; --panel:#ffffff; --panel-2:#eeeeec; --stage:#08080a;+ --ink:#17171b; --ink-dim:#41414a; --muted:#66666e; --faint:#9a9aa2;+ --line:rgba(0,0,0,.12); --line-2:rgba(0,0,0,.07);+}+:root[data-theme="light"] .grid-bg{background-image:radial-gradient(rgba(0,0,0,.06) 1px,transparent 1.4px)}+:root[data-theme="light"] .toplight{background:radial-gradient(80% 100% at 50% -12%,rgba(110,168,255,.12),transparent 62%)}+:root[data-theme="light"] .grain{opacity:.015}+:root[data-theme="light"] #q:focus{background:#fff}+:root[data-theme="light"] .chip.on{background:#17171b;color:#f5f5f3;border-color:#17171b}+.theme-btn{background:none;border:0;color:var(--muted);cursor:pointer;min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;transition:color .2s var(--ease)}+.theme-btn:hover{color:var(--ink)}+.theme-btn:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(128,128,128,.4)}+.theme-btn .sun{display:none}+:root[data-theme="light"] .theme-btn .moon{display:none}+:root[data-theme="light"] .theme-btn .sun{display:block}*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}html,body{background:var(--bg);color:var(--ink)}body{font-family:var(--mono);-webkit-font-smoothing:antialiased;overflow-x:hidden;position:relative;font-size:14px}@@ -654,15 +708,21 @@ main{position:relative;z-index:2;max-width:1200px;margin:0 auto;padding:clamp(24<main><div class="topbar"><span class="mark">Animation Handbook</span>- <a id="gh-stars" href="https://github.com/matinmonshizadeh/animation-handbook" target="_blank" rel="noopener noreferrer">GitHub <span class="gh-c" id="gh-star-count"></span></a>+ <span style="display:inline-flex;align-items:center;gap:14px">+ <button type="button" class="theme-btn" id="theme-toggle" aria-label="Toggle light/dark theme" title="Toggle theme">+ <svg class="moon" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>+ <svg class="sun" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>+ </button>+ <a id="gh-stars" href="https://github.com/matinmonshizadeh/animation-handbook" target="_blank" rel="noopener noreferrer">GitHub <span class="gh-c" id="gh-star-count"></span></a>+ </span></div><header class="hero"><p class="kicker">Web animation reference</p><h1 class="wordmark">Animation<br>Handbook</h1>- <p class="lede">A reference of 113 web animation techniques. Every entry is a live demo you can open in the browser and read how it works.</p>+ <p class="lede">A reference of 124 web animation techniques. Every entry is a live demo you can open in the browser and read how it works.</p><div class="hero-foot">- <div class="stat"><b>113</b><span>Techniques</span></div>+ <div class="stat"><b>124</b><span>Techniques</span></div><div class="stat"><b>07</b><span>Categories</span></div><div class="stat"><b>0</b><span>Dependencies</span></div></div>@@ -675,6 +735,15 @@ main{position:relative;z-index:2;max-width:1200px;margin:0 auto;padding:clamp(24</header><div id="root"></div>+ <noscript>+ <p style="color:var(--ink-dim);line-height:1.7;max-width:60ch">+ This index renders its demo grid with JavaScript. All 124 techniques are+ still browsable directly — see the+ <a href="https://github.com/matinmonshizadeh/animation-handbook#categories" style="color:var(--c1)">category list on GitHub</a>,+ or the <a href="sitemap.xml" style="color:var(--c1)">full sitemap</a>. Each+ demo is a standalone page under <code>/animations/<category>/<name>/</code>.+ </p>+ </noscript><p class="empty" id="empty">No technique matches that search.</p><footer class="footer">@@ -719,6 +788,7 @@ const CATS=[['section-wipe','Section Wipe','The next section slides over the current via sticky z-index stacking — scale-down adds depth.'],['zoom-into-image','Zoom Into Image','clip-path expands from a framed card to full-bleed as you scroll — the portal effect.'],['scroll-image-sequence','Scroll Image Sequence','A canvas pinned with sticky; scroll progress maps to a frame index — the Apple product-scroll technique, frames drawn procedurally.'],+ ['smooth-scroll','Smooth (Inertia) Scroll','Wheel and touch input eased toward a target each frame — weighted, gliding momentum instead of native jumps.'],]},{@@ -787,6 +857,13 @@ const CATS=[['cursor-follower','Cursor Follower','Custom element follows mouse with lerp lag — mix-blend-mode: difference inverts any background.'],['error-shake','Error Shake','An invalid field shakes horizontally with a decaying wobble and flashes red — the universal "no".'],['swipe-to-dismiss','Swipe to Dismiss','Drag a card past a threshold and it flies off as the row collapses — pointer-driven, touch-ready.'],+ ['hamburger-menu-toggle','Hamburger Menu Toggle','The bars icon morphs to an X — top and bottom bars rotate to cross while the middle fades out.'],+ ['theme-toggle-morph','Theme Toggle Morph','A sun morphs into a crescent moon as the interface flips between light and dark.'],+ ['copy-to-clipboard','Copy to Clipboard','The copy button swaps to a checkmark and a Copied confirmation, then reverts after a moment.'],+ ['star-rating','Star Rating','Stars fill toward the pointer and pop on commit — an accessible five-star control.'],+ ['toast-notification','Toast Notification','Notification cards slide in from a corner, stack, and auto-dismiss with a progress bar — swipe or click to dismiss.'],+ ['segmented-control','Segmented Control','A highlighted pill slides beneath the selected segment as the active label crossfades — the iOS control.'],+ ['pull-to-refresh','Pull to Refresh','Dragging past the top reveals a spinner that fills with distance; release past the threshold to refresh.'],]},{@@ -832,6 +909,7 @@ const CATS=[['cloth-simulation','Cloth Simulation','Verlet integration + distance constraints — draggable flag responds to gravity and wind.'],['volumetric-smoke','Volumetric Smoke','Ray marching accumulates 3D noise density — light scattering, shadow rays, fBm clouds.'],['morphing-blob','Morphing Blob','Metaball circles fused by an SVG blur-plus-contrast filter melt like liquid — the blob drifts and a droplet chases the pointer.'],+ ['flip-card-3d','3D Flip Card','A card rotates in 3D to reveal its back face using preserve-3d, perspective, and backface-visibility.'],]},{@@ -854,6 +932,8 @@ const CATS=[['particle-constellation','Particle Constellation','Drifting nodes link with lines when they come close — the network-mesh hero background.'],['flow-field','Flow Field','Particles follow a noise-driven vector field, leaving flowing trails.'],['synthwave-grid','Synthwave Grid','A perspective grid scrolls toward a glowing sun — the retro synthwave horizon.'],+ ['matrix-rain','Matrix Rain','Columns of glowing characters fall down a dark canvas, leaders bright and trails fading.'],+ ['plasma','Plasma Field','Summed sine functions of x, y, and time make a flowing, organic color field — the demoscene classic.'],]}];@@ -1115,7 +1195,8 @@ if('IntersectionObserver'in window){const q=document.getElementById('q'),emptyEl=document.getElementById('empty'),sections=[...document.querySelectorAll('.cat')];const cards=[...document.querySelectorAll('.card')];cards.forEach(c=>c._t=c.textContent.toLowerCase());-let activeCat='all';+let activeCat='all';const slugToChip={};+const slugify=x=>x.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'');function applyFilter(){const term=q.value.trim().toLowerCase();let shown=0;sections.forEach(s=>{const catOk=activeCat==='all'||s.classList.contains(activeCat);let vis=0;@@ -1123,18 +1204,34 @@ function applyFilter(){s.hidden=vis===0;});emptyEl.classList.toggle('show',shown===0);}-q.addEventListener('input',applyFilter);+function syncURL(){+ const p=new URLSearchParams();+ const on=chipBar&&chipBar.querySelector('.chip.on');+ if(activeCat!=='all'&&on&&on.dataset.slug)p.set('cat',on.dataset.slug);+ const term=q.value.trim();if(term)p.set('q',term);+ const qs=p.toString();history.replaceState(null,'',qs?'?'+qs:location.pathname);+}+q.addEventListener('input',()=>{applyFilter();syncURL();});const chipBar=document.getElementById('chips');if(chipBar){- const mk=(label,cat)=>{const b=document.createElement('button');b.type='button';b.className='chip'+(cat==='all'?' on':'');b.textContent=label;b.dataset.cat=cat;chipBar.appendChild(b);};- mk('All','all');CATS.forEach(c=>mk(c.name,c.cat.replace('-cat','')));+ const mk=(label,cat,slug)=>{const b=document.createElement('button');b.type='button';b.className='chip'+(cat==='all'?' on':'');b.textContent=label;b.dataset.cat=cat;if(slug){b.dataset.slug=slug;slugToChip[slug]=b;}chipBar.appendChild(b);};+ mk('All','all');CATS.forEach(c=>mk(c.name,c.cat.replace('-cat',''),slugify(c.name)));chipBar.addEventListener('click',e=>{const b=e.target.closest('.chip');if(!b)return;- activeCat=b.dataset.cat;chipBar.querySelectorAll('.chip').forEach(x=>x.classList.toggle('on',x===b));applyFilter();+ activeCat=b.dataset.cat;chipBar.querySelectorAll('.chip').forEach(x=>x.classList.toggle('on',x===b));applyFilter();syncURL();if(activeCat!=='all'){const sec=sections.find(s=>s.classList.contains(activeCat));if(sec)sec.scrollIntoView({behavior:reduce?'auto':'smooth',block:'start'});}});}+(function initFromURL(){+ const p=new URLSearchParams(location.search),term=p.get('q'),cat=p.get('cat');+ if(term)q.value=term;+ if(cat&&slugToChip[cat]){const b=slugToChip[cat];activeCat=b.dataset.cat;chipBar.querySelectorAll('.chip').forEach(x=>x.classList.toggle('on',x===b));}+ if(term||(cat&&slugToChip[cat]))applyFilter();+})();+(function(){const btn=document.getElementById('theme-toggle');if(!btn)return;+ btn.addEventListener('click',()=>{const next=document.documentElement.dataset.theme==='light'?'dark':'light';+ document.documentElement.dataset.theme=next;try{localStorage.setItem('ah-theme',next);}catch(e){}});})();addEventListener('keydown',e=>{const t=document.activeElement.tagName;if(e.key==='/'&&document.activeElement!==q&&t!=='INPUT'){e.preventDefault();q.focus();}- else if(e.key==='Escape'&&document.activeElement===q){q.value='';q.dispatchEvent(new Event('input'));q.blur();}});+ else if(e.key==='Escape'&&document.activeElement===q){q.value='';q.dispatchEvent(new Event('input'));q.blur();syncURL();}});</script></body></html>diff --git a/og-image.png b/og-image.pngnew file mode 100644index 00000000..bea66833Binary files /dev/null and b/og-image.png differdiff --git a/robots.txt b/robots.txtnew file mode 100644index 00000000..0f8bbfd0--- /dev/null+++ b/robots.txt@@ -0,0 +1,32 @@+# Animation Handbook — robots.txt+# All crawlers welcome, including AI answer engines.++User-agent: *+Allow: /++# AI / answer-engine crawlers (explicitly allowed for discoverability)+User-agent: GPTBot+Allow: /++User-agent: OAI-SearchBot+Allow: /++User-agent: ChatGPT-User+Allow: /++User-agent: ClaudeBot+Allow: /++User-agent: Claude-Web+Allow: /++User-agent: PerplexityBot+Allow: /++User-agent: Google-Extended+Allow: /++User-agent: Applebot-Extended+Allow: /++Sitemap: https://matinmonshizadeh.github.io/animation-handbook/sitemap.xmldiff --git a/samples/fonts/brico-400.woff2 b/samples/fonts/brico-400.woff2new file mode 100644index 00000000..ccc73da0Binary files /dev/null and b/samples/fonts/brico-400.woff2 differdiff --git a/samples/fonts/brico-700.woff2 b/samples/fonts/brico-700.woff2new file mode 100644index 00000000..515c1f09Binary files /dev/null and b/samples/fonts/brico-700.woff2 differdiff --git a/samples/fonts/brico-800.woff2 b/samples/fonts/brico-800.woff2new file mode 100644index 00000000..b3da42ebBinary files /dev/null and b/samples/fonts/brico-800.woff2 differdiff --git a/samples/fonts/plex-400.woff2 b/samples/fonts/plex-400.woff2new file mode 100644index 00000000..0804aaffBinary files /dev/null and b/samples/fonts/plex-400.woff2 differdiff --git a/samples/fonts/plex-500.woff2 b/samples/fonts/plex-500.woff2new file mode 100644index 00000000..090f82f7Binary files /dev/null and b/samples/fonts/plex-500.woff2 differdiff --git a/samples/home-redesign.html b/samples/home-redesign.htmlnew file mode 100644index 00000000..e3b45eab--- /dev/null+++ b/samples/home-redesign.html@@ -0,0 +1,336 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1.0">+<title>Animation Handbook — redesign sample</title>+<script>document.documentElement.classList.add('js')</script>+<style>+@font-face{font-family:'Bricolage';src:url('fonts/brico-400.woff2') format('woff2');font-weight:400;font-display:swap}+@font-face{font-family:'Bricolage';src:url('fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}+@font-face{font-family:'Bricolage';src:url('fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}+@font-face{font-family:'PlexMono';src:url('fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}+@font-face{font-family:'PlexMono';src:url('fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}++:root{+ --bg:#0b0b0d; --panel:#111114; --panel-2:#0c0c0f; --stage:#08080a;+ --ink:#f4f4f2; --ink-dim:#adadb2; --muted:#77777e; --faint:#4c4c54;+ --line:rgba(255,255,255,.085); --line-2:rgba(255,255,255,.05);+ --c1:#6ea8ff; --c2:#5fd88a; --c3:#b98cff; --c4:#ff9d5c; --c5:#ff6f8b; --c6:#3fd6c4; --c7:#ffce5a;+ --disp:'Bricolage','Arial Narrow',sans-serif;+ --mono:'PlexMono',ui-monospace,"Cascadia Mono",Menlo,Consolas,monospace;+ --ease:cubic-bezier(.22,1,.36,1);+}+*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+html,body{background:var(--bg);color:var(--ink)}+body{font-family:var(--mono);-webkit-font-smoothing:antialiased;overflow-x:hidden;position:relative;font-size:14px}++/* engineered background: dot grid + faint top light + grain */+.grid-bg{position:fixed;inset:0;z-index:0;pointer-events:none;+ background-image:radial-gradient(rgba(255,255,255,.05) 1px,transparent 1.4px);background-size:28px 28px;+ -webkit-mask:radial-gradient(130% 78% at 50% -6%,#000 38%,transparent 84%);mask:radial-gradient(130% 78% at 50% -6%,#000 38%,transparent 84%)}+.toplight{position:fixed;top:0;left:0;right:0;height:70vh;z-index:0;pointer-events:none;+ background:radial-gradient(80% 100% at 50% -12%,rgba(110,168,255,.06),transparent 62%)}+.grain{position:fixed;inset:0;z-index:1;pointer-events:none;opacity:.03;mix-blend-mode:overlay;+ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}++main{position:relative;z-index:2;max-width:1200px;margin:0 auto;padding:clamp(24px,4vw,60px) clamp(18px,4vw,52px) 120px}++/* ── top bar ── */+.topbar{display:flex;justify-content:space-between;align-items:center;padding-bottom:clamp(50px,10vw,120px);+ font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}+.topbar .mark{color:var(--ink);font-weight:500}+.topbar a{color:var(--muted);text-decoration:none;transition:color .2s var(--ease)}+.topbar a:hover{color:var(--ink)}++/* ── hero ── */+.hero{padding-bottom:clamp(34px,5vw,58px)}+.kicker{font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--muted);margin-bottom:22px}+.wordmark{font-family:var(--disp);font-weight:800;line-height:.86;letter-spacing:-.045em;+ font-size:clamp(58px,14vw,190px);text-transform:none}+.lede{font-size:clamp(14px,1.7vw,17px);line-height:1.6;color:var(--ink-dim);max-width:52ch;margin-top:30px}+.hero-foot{display:flex;flex-wrap:wrap;gap:0;align-items:stretch;margin-top:40px;border:1px solid var(--line);border-radius:3px;width:fit-content;max-width:100%}+.stat{padding:16px 26px 15px;display:flex;flex-direction:column;gap:5px}+.stat+.stat{border-left:1px solid var(--line)}+.stat b{font-family:var(--disp);font-weight:700;font-size:26px;letter-spacing:-.02em;line-height:1;font-variant-numeric:tabular-nums}+.stat span{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}++/* ── search ── */+.search{position:relative;display:flex;align-items:center;margin-top:34px;max-width:520px}+.search svg{position:absolute;left:16px;opacity:.45;pointer-events:none}+#q{width:100%;min-height:52px;background:var(--panel-2);border:1px solid var(--line);border-radius:3px;+ color:var(--ink);font-family:var(--mono);font-size:13px;letter-spacing:.02em;padding:14px 84px 14px 44px;+ outline:none;transition:border-color .25s var(--ease),background .25s var(--ease)}+#q::placeholder{color:var(--faint)}+#q:focus{border-color:rgba(255,255,255,.28);background:#141418}+.kbd{position:absolute;right:14px;font-size:10px;letter-spacing:.1em;color:var(--muted);border:1px solid var(--line);border-radius:3px;padding:3px 8px;transition:opacity .2s}+#q:focus~.kbd,#q:not(:placeholder-shown)~.kbd{opacity:0}++/* ── category header ── */+.chapter{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:clamp(16px,3vw,30px);+ margin:clamp(60px,9vw,104px) 0 clamp(24px,3vw,36px);padding-bottom:20px;border-bottom:1px solid var(--line-2)}+.ch-num{font-family:var(--disp);font-weight:800;font-size:clamp(40px,7vw,78px);line-height:.8;color:var(--accent);+ font-variant-numeric:tabular-nums;letter-spacing:-.04em}+.chapter h2{font-family:var(--disp);font-weight:700;font-size:clamp(21px,3.4vw,34px);line-height:1;letter-spacing:-.02em}+.ch-desc{font-size:12px;line-height:1.6;color:var(--muted);max-width:50ch;margin-top:9px}+.ch-count{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--faint);white-space:nowrap;text-align:right}++/* ── grid + card ── */+.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(12px,1.4vw,18px)}+@media(max-width:920px){.grid{grid-template-columns:repeat(2,1fr)}}+@media(max-width:580px){.grid{grid-template-columns:1fr}}++.card{--accent:var(--c1);position:relative;background:var(--panel);border:1px solid var(--line-2);border-radius:4px;+ overflow:hidden;cursor:pointer;text-decoration:none;color:inherit;+ transition:transform .45s var(--ease),border-color .3s var(--ease)}+.c1{--accent:var(--c1)}.c2{--accent:var(--c2)}.c3{--accent:var(--c3)}.c4{--accent:var(--c4)}.c5{--accent:var(--c5)}.c6{--accent:var(--c6)}.c7{--accent:var(--c7)}+@media(hover:hover){.card:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--accent) 50%,transparent)}}+.card:active{transform:translateY(-1px) scale(.995);transition-duration:.1s}+.card:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 55%,transparent)}++.stage{position:relative;aspect-ratio:16/10;overflow:hidden;background:var(--stage);border-bottom:1px solid var(--line-2)}+.pv{position:absolute;inset:0;transition:transform .6s var(--ease)}+@media(hover:hover){.card:hover .pv{transform:scale(1.04)}}+.live{position:absolute;right:11px;top:11px;z-index:4;width:6px;height:6px;border-radius:50%;background:var(--accent);opacity:0;transition:opacity .45s var(--ease)}+.card.playing .live{opacity:.85;animation:livepulse 2s ease-in-out infinite}+@keyframes livepulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 55%,transparent)}70%,100%{box-shadow:0 0 0 5px transparent}}++.meta{padding:14px 15px 16px;display:flex;flex-direction:column;gap:7px}+.plate{display:flex;align-items:center;justify-content:space-between;font-size:10px;letter-spacing:.1em}+.plate .idx{color:var(--accent);font-variant-numeric:tabular-nums}+.plate .tag{color:var(--faint);text-transform:uppercase;letter-spacing:.16em}+.card .title{font-family:var(--disp);font-weight:700;font-size:17px;letter-spacing:-.015em;line-height:1.1;transition:color .25s var(--ease)}+@media(hover:hover){.card:hover .title{color:var(--accent)}}+.card .desc{font-size:11.5px;line-height:1.55;color:var(--muted)}++.empty{display:none;text-align:center;color:var(--muted);font-size:13px;padding:56px 0}+.empty.show{display:block}+.cat[hidden]{display:none}++.footer{margin-top:104px;padding-top:26px;border-top:1px solid var(--line-2);display:flex;flex-wrap:wrap;gap:12px;+ justify-content:space-between;align-items:center;font-size:11px;letter-spacing:.08em;color:var(--faint)}+.footer a{color:var(--muted);text-decoration:none}+.footer a:hover{color:var(--ink)}+.flag{position:fixed;z-index:20;left:16px;bottom:16px;font-size:10px;letter-spacing:.14em;text-transform:uppercase;+ color:var(--muted);background:rgba(11,11,13,.85);backdrop-filter:blur(6px);border:1px solid var(--line);+ padding:7px 13px;border-radius:3px;pointer-events:none}++/* ── preview engines ── */+.pv *{will-change:transform,opacity}+.card:not(.playing) .pv .anim{animation-play-state:paused!important}++.pv-aurora{background:#04060e}+.pv-aurora .band{position:absolute;top:-40%;height:180%;width:44%;filter:blur(26px);opacity:.85;border-radius:50%}+.pv-aurora .b1{left:2%;background:linear-gradient(var(--c6),transparent);animation:aur 6s ease-in-out infinite}+.pv-aurora .b2{left:34%;background:linear-gradient(var(--c1),transparent);animation:aur 7.5s ease-in-out infinite -2s}+.pv-aurora .b3{left:62%;background:linear-gradient(var(--c3),transparent);animation:aur 6.8s ease-in-out infinite -4s}+@keyframes aur{0%,100%{transform:translateX(-10%) skewX(-14deg) scaleY(.9)}50%{transform:translateX(14%) skewX(12deg) scaleY(1.1)}}++.pv-mesh{background:#0a0710}+.pv-mesh .m{position:absolute;width:70%;height:70%;border-radius:50%;filter:blur(24px);mix-blend-mode:screen}+.pv-mesh .m1{top:-14%;left:-10%;background:radial-gradient(circle,var(--c4),transparent 65%);animation:mesh 9s ease-in-out infinite}+.pv-mesh .m2{bottom:-16%;right:-8%;background:radial-gradient(circle,var(--c3),transparent 65%);animation:mesh 11s ease-in-out infinite -3s}+.pv-mesh .m3{top:20%;left:38%;background:radial-gradient(circle,var(--c5),transparent 65%);animation:mesh 10s ease-in-out infinite -6s}+@keyframes mesh{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(18%,-12%) scale(1.2)}66%{transform:translate(-14%,14%) scale(.85)}}++.pv-glow{background:radial-gradient(circle at 50% 52%,#12100a,#050609 70%)}+.pv-glow .core{position:absolute;top:50%;left:50%;width:34%;height:34%;transform:translate(-50%,-50%);border-radius:50%;+ background:radial-gradient(circle,var(--c7),transparent 66%);filter:blur(8px);animation:breath 5s ease-in-out infinite}+.pv-glow .ring{position:absolute;top:50%;left:50%;width:34%;height:34%;transform:translate(-50%,-50%);border-radius:50%;+ border:1px solid color-mix(in srgb,var(--c7) 50%,transparent);animation:breathring 5s ease-in-out infinite}+@keyframes breath{0%,100%{transform:translate(-50%,-50%) scale(.8);opacity:.6}50%{transform:translate(-50%,-50%) scale(1.25);opacity:1}}+@keyframes breathring{0%,100%{transform:translate(-50%,-50%) scale(.9);opacity:.7}50%{transform:translate(-50%,-50%) scale(2);opacity:0}}++.pv-ripple{background:#0b0805;display:grid;place-items:center}+.pv-ripple .r{position:absolute;width:14%;height:22%;border-radius:50%;border:1.5px solid var(--c4);opacity:0;animation:rip 2.4s ease-out infinite}+.pv-ripple .r2{animation-delay:-.8s}.pv-ripple .r3{animation-delay:-1.6s}+@keyframes rip{0%{transform:scale(.4);opacity:.9}100%{transform:scale(4.5);opacity:0}}+.pv-ripple .dot{width:8px;height:8px;border-radius:50%;background:var(--c4)}++.pv-spinner{background:#0b0805;display:grid;place-items:center}+.pv-spinner .s{width:30%;aspect-ratio:1;border-radius:50%;background:conic-gradient(from 0deg,transparent,var(--c4));+ -webkit-mask:radial-gradient(farthest-side,transparent 58%,#000 60%);mask:radial-gradient(farthest-side,transparent 58%,#000 60%);animation:spin 1s linear infinite}+@keyframes spin{to{transform:rotate(360deg)}}++.pv-shimmer{background:#0a0c11;padding:16% 15%;display:flex;flex-direction:column;gap:9%;justify-content:center}+.pv-shimmer .ln{height:9px;border-radius:3px;position:relative;overflow:hidden;background:#181820}+.pv-shimmer .ln:nth-child(2){width:78%}.pv-shimmer .ln:nth-child(3){width:56%}+.pv-shimmer .ln::after{content:"";position:absolute;inset:0;transform:translateX(-100%);+ background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--c4) 55%,transparent),transparent);animation:shim 1.6s ease-in-out infinite}+@keyframes shim{100%{transform:translateX(100%)}}++.pv-gtext{background:#0c0608;display:grid;place-items:center}+.pv-gtext span{font-family:var(--disp);font-size:58px;font-weight:800;letter-spacing:-.03em;+ background:linear-gradient(100deg,var(--c5),var(--c3),var(--c1),var(--c5));background-size:280% 100%;+ -webkit-background-clip:text;background-clip:text;color:transparent;animation:gtext 4s linear infinite}+@keyframes gtext{to{background-position:280% 0}}++.pv-marquee{background:#0c0608;display:flex;flex-direction:column;justify-content:center;gap:11%;overflow:hidden}+.pv-marquee .row{display:flex;white-space:nowrap;font-family:var(--disp);font-weight:700;font-size:24px;color:var(--ink-dim)}+.pv-marquee .r-a{animation:mqa 7s linear infinite}+.pv-marquee .r-b{animation:mqb 9s linear infinite;color:var(--c5)}+@keyframes mqa{to{transform:translateX(-50%)}}+@keyframes mqb{from{transform:translateX(-50%)}to{transform:translateX(0)}}++.pv-scramble{background:#0c0608;display:grid;place-items:center}+.pv-scramble .txt{font-family:var(--mono);font-weight:500;font-size:24px;letter-spacing:.1em;color:var(--c5)}++.pv canvas{position:absolute;inset:0;width:100%;height:100%;display:block}++@media(prefers-reduced-motion:reduce){+ .card .pv .anim,.pv-aurora .band,.pv-mesh .m,.pv-glow .core,.pv-glow .ring,.pv-ripple .r,.pv-spinner .s,+ .pv-shimmer .ln::after,.pv-gtext span,.pv-marquee .row{animation-play-state:paused!important}+ .card{transition:border-color .2s}+ .card:hover .pv{transform:none}+ .card.playing .live{animation:none;opacity:.6}+}+</style>+</head>+<body>+<div class="grid-bg"></div><div class="toplight"></div><div class="grain"></div>+<div class="flag">Preview of new design</div>++<main>+ <div class="topbar">+ <span class="mark">Animation Handbook</span>+ <a href="https://github.com/matinmonshizadeh/animation-handbook">GitHub</a>+ </div>++ <header class="hero">+ <p class="kicker">Web animation reference</p>+ <h1 class="wordmark">Animation<br>Handbook</h1>+ <p class="lede">A reference of 100 web animation techniques. Every entry is a live demo you can open in the browser and read how it works.</p>+ <div class="hero-foot">+ <div class="stat"><b>100</b><span>Techniques</span></div>+ <div class="stat"><b>07</b><span>Categories</span></div>+ <div class="stat"><b>0</b><span>Dependencies</span></div>+ </div>+ <div class="search">+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>+ <input id="q" type="search" autocomplete="off" spellcheck="false" placeholder="Search techniques" aria-label="Search techniques">+ <span class="kbd" aria-hidden="true">/</span>+ </div>+ </header>++ <div id="root"></div>+ <p class="empty" id="empty">No technique matches that search.</p>++ <footer class="footer">+ <span>Animation Handbook</span>+ <a href="https://github.com/matinmonshizadeh/animation-handbook">github.com/matinmonshizadeh/animation-handbook</a>+ </footer>+</main>++<script>+const CATS=[+ {n:'07',name:'Ambient & Background',cls:'c7',+ desc:'Passive, looping effects that hold visual interest without demanding attention.',+ items:[+ ['Aurora','aurora','Tall color bands drift and skew. Heavy blur fakes a curtain of light.'],+ ['Mesh Gradient','mesh','Blurred radial blobs drift and blend into an organic color wash.'],+ ['Starfield','starfield','Stars drift outward with parallax depth at a slow ambient speed.'],+ ['Breathing Glow','glow','A radial glow expands and contracts on a five-second cycle.'],+ ]},+ {n:'04',name:'Micro-Interactions',cls:'c4',+ desc:'Short, user-triggered responses that confirm the interface registered an action.',+ items:[+ ['Tap Ripple','ripple','A ripple spreads from the exact point of contact.'],+ ['Loading Spinner','spinner','A single conic sweep masked into a ring reads as fast loading.'],+ ['Shimmer Skeleton','shimmer','A gradient sweep over placeholder blocks suggests streaming content.'],+ ]},+ {n:'05',name:'Text & Typography',cls:'c5',+ desc:'Motion built specifically for letterforms and running type.',+ items:[+ ['Gradient Flow','gtext','A moving gradient clipped to text pushes color through the glyphs.'],+ ['Marquee Ticker','marquee','Continuous scroll with a seamless loop. Duplicated content hides the reset.'],+ ['Scramble Text','scramble','Characters cycle at random, then lock left to right.'],+ ]},+];++const root=document.getElementById('root');+CATS.forEach(cat=>{+ const sec=document.createElement('section');sec.className='cat '+cat.cls;+ sec.innerHTML=`<header class="chapter"><span class="ch-num">${cat.n}</span>+ <div class="ch-body"><h2>${cat.name}</h2><p class="ch-desc">${cat.desc}</p></div>+ <span class="ch-count">${String(cat.items.length).padStart(2,'0')} demos</span></header>`;+ const grid=document.createElement('div');grid.className='grid';+ cat.items.forEach(([name,pv,desc],i)=>{+ const a=document.createElement('a');a.className='card '+cat.cls;a.href='#';a.dataset.pv=pv;+ a.innerHTML=`<div class="stage"><div class="pv pv-${pv}"></div><span class="live" aria-hidden="true"></span></div>+ <div class="meta"><div class="plate"><span class="idx">${cat.n}.${String(i+1).padStart(2,'0')}</span><span class="tag">${cat.name.split(' ')[0].replace('&','')}</span></div>+ <h3 class="title">${name}</h3><p class="desc">${desc}</p></div>`;+ grid.appendChild(a);+ });+ sec.appendChild(grid);root.appendChild(sec);+});++const reduce=matchMedia('(prefers-reduced-motion:reduce)').matches;+const html={+ aurora:'<span class="band b1 anim"></span><span class="band b2 anim"></span><span class="band b3 anim"></span>',+ mesh:'<span class="m m1 anim"></span><span class="m m2 anim"></span><span class="m m3 anim"></span>',+ glow:'<span class="core anim"></span><span class="ring anim"></span>',+ ripple:'<span class="r anim"></span><span class="r r2 anim"></span><span class="r r3 anim"></span><span class="dot"></span>',+ spinner:'<span class="s anim"></span>',+ shimmer:'<span class="ln anim"></span><span class="ln anim"></span><span class="ln anim"></span>',+ gtext:'<span class="anim">Aa</span>',+ marquee:'<div class="row r-a anim"><span>ANIMATION HANDBOOK </span><span>ANIMATION HANDBOOK </span></div><div class="row r-b anim"><span>KINETIC TYPE </span><span>KINETIC TYPE </span></div>',+ scramble:'<span class="txt">SCRAMBLE</span>',+};+document.querySelectorAll('.pv').forEach(pv=>{+ const type=[...pv.classList].find(c=>c.startsWith('pv-')).slice(3);+ pv.innerHTML=html[type]||'';+});++function starfield(pv){+ const c=document.createElement('canvas');pv.appendChild(c);const ctx=c.getContext('2d');+ let w,h,stars,raf=null;+ function size(){const r=pv.getBoundingClientRect();w=c.width=r.width*devicePixelRatio;h=c.height=r.height*devicePixelRatio;+ stars=Array.from({length:90},()=>({x:(Math.random()-.5)*w,y:(Math.random()-.5)*h,z:Math.random()*w}));draw(false);}+ function draw(advance){+ ctx.fillStyle=advance?'rgba(4,5,12,.35)':'#04050c';ctx.fillRect(0,0,w,h);+ ctx.save();ctx.translate(w/2,h/2);+ for(const s of stars){if(advance){s.z-=w*.004;if(s.z<1){s.z=w;s.x=(Math.random()-.5)*w;s.y=(Math.random()-.5)*h;}}+ const k=128/s.z,x=s.x*k,y=s.y*k,size=(1-s.z/w)*2.4*devicePixelRatio;+ ctx.fillStyle='rgba(110,168,255,'+(1-s.z/w)+')';ctx.beginPath();ctx.arc(x,y,Math.max(size,.4),0,7);ctx.fill();}+ ctx.restore();+ }+ function frame(){draw(true);raf=requestAnimationFrame(frame);}+ size();addEventListener('resize',size);+ return {play(){if(!raf&&!reduce)frame();},pause(){if(raf){cancelAnimationFrame(raf);raf=null;}}};+}+function scramble(pv){+ const el=pv.querySelector('.txt'),final='SCRAMBLE',chars='ABCDEFGHJKLMNPQRSTUVWXYZ#%$&/<>*';let t=null,locked=0;+ function step(){locked+=.5;let s='';for(let i=0;i<final.length;i++){s+=i<locked?final[i]:chars[Math.floor(Math.random()*chars.length)];}+ el.textContent=s;if(locked<final.length)t=setTimeout(step,45);else t=null;}+ return {play(){if(reduce){el.textContent=final;return;}locked=0;clearTimeout(t);step();},pause(){clearTimeout(t);t=null;el.textContent=final;}};+}+const engines={starfield,scramble};++document.querySelectorAll('.card').forEach(card=>{+ const pv=card.querySelector('.pv'),type=card.dataset.pv;+ const eng=engines[type]?engines[type](pv):null;+ card._play=()=>{card.classList.add('playing');eng&&eng.play();};+ card._pause=()=>{card.classList.remove('playing');eng&&eng.pause();};+ card.addEventListener('click',e=>e.preventDefault());+ card.addEventListener('focus',card._play);+});+const hoverCap=matchMedia('(hover:hover)').matches;+if('IntersectionObserver'in window){+ const io=new IntersectionObserver(es=>es.forEach(e=>{e.target[e.isIntersecting?'_play':'_pause']();}),+ hoverCap?{threshold:.28}:{rootMargin:'-34% 0px -34% 0px'});+ document.querySelectorAll('.card').forEach(c=>io.observe(c));+}else{document.querySelectorAll('.card').forEach(c=>c._play());}++const q=document.getElementById('q'),emptyEl=document.getElementById('empty'),sections=[...document.querySelectorAll('.cat')];+const cards=[...document.querySelectorAll('.card')];cards.forEach(c=>c._t=c.textContent.toLowerCase());+q.addEventListener('input',()=>{+ const term=q.value.trim().toLowerCase();let shown=0;+ sections.forEach(s=>{let vis=0;s.querySelectorAll('.card').forEach(c=>{const m=!term||c._t.includes(term);c.style.display=m?'':'none';if(m){vis++;shown++;}});s.hidden=vis===0;});+ emptyEl.classList.toggle('show',shown===0);+});+addEventListener('keydown',e=>{const t=document.activeElement.tagName;+ if(e.key==='/'&&document.activeElement!==q&&t!=='INPUT'){e.preventDefault();q.focus();}+ else if(e.key==='Escape'&&document.activeElement===q){q.value='';q.dispatchEvent(new Event('input'));q.blur();}});+</script>+</body>+</html>diff --git a/sitemap.xml b/sitemap.xmlnew file mode 100644index 00000000..73d0b477--- /dev/null+++ b/sitemap.xml@@ -0,0 +1,128 @@+<?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-07-13</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/parallax-depth-of-field/</loc><lastmod>2026-07-13</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-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/reverse-scrolling-columns/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/cover-card-to-fixed-header/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/fly-in-fly-out-contact-list/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/stacking-cards/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scroll-trigger/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scrub-animation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/pin-animation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/snap-scrolling/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scrollytelling/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/reveal-on-scroll/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/stagger-reveal/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/horizontal-scroll/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/sticky-section/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/counter-animation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/progress-bar/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/section-wipe/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/zoom-into-image/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/scroll-image-sequence/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/01-scroll-based/smooth-scroll/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/fade-in-out/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/slide-in/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/slide-up-reveal/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/scale-in/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/clip-path-reveal/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/curtain-reveal/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/split-text-reveal/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/letter-by-letter-stagger/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/word-by-word-reveal/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/blur-in/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/flip-in/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/bounce-in/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/02-entrance-and-exit/rotate-in/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/view-transitions-api/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/shared-element-transition/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/morph-transition/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/crossfade/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/slide-transition/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/zoom-transition/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/flash-transition/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/blur-transition/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/elastic-transition/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/03-page-transitions/portal-zoom/</loc><lastmod>2026-07-13</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-13</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-13</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-13</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-13</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-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/button-press-scale/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/magnetic-button/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/toggle-switch/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/heart-burst/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/success-confetti/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/skeleton-loader/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/shimmer-effect/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/loading-spinner/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/progress-animation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/checkmark-draw/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/form-field-morph/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/badge-pulse/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/tooltip-reveal/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/drawer-slide/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/modal-expand/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/accordion/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/cursor-follower/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/error-shake/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/swipe-to-dismiss/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/hamburger-menu-toggle/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/theme-toggle-morph/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/copy-to-clipboard/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/star-rating/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/toast-notification/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/segmented-control/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/04-micro-interactions/pull-to-refresh/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/kinetic-typography/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/typewriter-effect/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/scramble-text/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/variable-font-morph/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-clip-path-reveal/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/marquee-ticker/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-morphing/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-gradient-animation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/outline-to-fill/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/enter-exit-typography/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/rotate-word-carousel/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/glitch-text/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/text-on-path/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/05-text-typography/wavy-text/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/3d-model-orbit/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/scroll-driven-3d-rotation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/parallax-3d-tilt/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/canvas-particle-effect/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/fluid-simulation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/glassmorphism-animated/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/webgl-shader-animation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/noise-based-motion/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/svg-path-animation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/chromatic-aberration/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/2-5d-pseudo-3d/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/ray-marching-sdf/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/gpgpu-particle-system/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/image-distortion-hover/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/cloth-simulation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/volumetric-smoke/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/morphing-blob/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/flip-card-3d/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/animated-gradient-background/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/mesh-gradient/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/aurora/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/grain-overlay/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/scanline/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/light-leak/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/starfield/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/breathing-glow/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/ambient-ripple/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/floating-elements/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/grid-dot-pattern-parallax/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/abstract-geometric-motion/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/particle-constellation/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/flow-field/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/synthwave-grid/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/matrix-rain/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/plasma/</loc><lastmod>2026-07-13</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+</urlset>