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
docs: add READMEs for 3 fixed demos, update category and site indexes
matin28525c8f5623
diff --git a/animations/01-scroll-based/README.md b/animations/01-scroll-based/README.mdindex 94cb7ffe..1a7159d5 100644--- a/animations/01-scroll-based/README.md+++ b/animations/01-scroll-based/README.md@@ -14,8 +14,8 @@ Techniques driven by scroll position.into a compact fixed header; every visual property driven by a single 0→1 progress value.- [Fly-in Fly-out Contact List](fly-in-fly-out-contact-list/) — rows translate and fadeas they enter and exit the scroll viewport; effect scrubbed continuously to scroll position.-- [Stacking Cards](stacking-cards/) — cards stack visually as they overlap; position: sticky- does the work, scroll drives optional depth cues via scale and brightness.+- [Stacking Cards](stacking-cards/) — cards fan into a deck as they stack; per-index sticky+ offset creates the peek, CSS Scroll-Driven Animations drive the scale.- [ScrollTrigger Animation](scroll-trigger/) — demonstrates the onEnter/onLeave/onEnterBack/onLeaveBack lifecycle using IntersectionObserver and vanilla scroll events.- [Scrub Animation](scrub-animation/) — a camera lens disassembles in five stages as you scroll;@@ -24,3 +24,21 @@ Techniques driven by scroll position.CSS sticky while four features swap in sequence during the scroll.- [Snap Scrolling](snap-scrolling/) — CSS scroll-snap-type creates a paginated, magnetic feel;switch between mandatory, proximity, and none to feel the difference.+- [Scrollytelling](scrollytelling/) — fractional chapter progress drives continuous depth+ crossfades across six ocean-layer chapters; a porthole visual responds between discrete states.+- [Reveal on Scroll](reveal-on-scroll/) — seven reveal techniques (fade, slide, scale, blur,+ clip-path mask, stagger) fired by IntersectionObserver at a configurable trigger line.+- [Stagger Reveal](stagger-reveal/) — groups of elements reveal sequentially with cascading+ delays; forward, reverse, center-out, and random cascade directions on a grid, list, and chips.+- [Horizontal Scroll](horizontal-scroll/) — vertical scroll translates a horizontal panel+ strip; a tall pinned section provides the scroll budget, translateX does the work.+- [Sticky Section](sticky-section/) — the whole section pins to the viewport while its+ interior morphs through four states scrubbed to scroll position within the section.+- [Counter Animation](counter-animation/) — numbers count 0 → target with easing when the+ stats section enters the internal viewport; four counter formats with stagger support.+- [Progress Bar](progress-bar/) — reading progress indicator in three styles: top bar,+ circular ring, and side rail; all driven by scrollTop / (scrollHeight − clientHeight).+- [Section Wipe](section-wipe/) — the next section slides over the current one via sticky+ z-index stacking; a scale-down on the receding layer adds depth to the transition.+- [Zoom Into Image](zoom-into-image/) — clip-path expands from a framed card to full-bleed+ as you scroll; the portal effect is clip-path: inset() collapsing from center outward.diff --git a/animations/01-scroll-based/counter-animation/README.md b/animations/01-scroll-based/counter-animation/README.mdnew file mode 100644index 00000000..2b9d1c7c--- /dev/null+++ b/animations/01-scroll-based/counter-animation/README.md@@ -0,0 +1,75 @@+# Counter Animation++[Live demo](index.html)++## What it is++Numeric counters that animate from zero to a target value when a stats section enters the viewport. Each counter runs a requestAnimationFrame loop driven by elapsed time, applying an easing function and formatting the value every frame. Four counters run simultaneously with optional per-counter stagger delays.++## When to use it++- Stats and metrics sections where raw numbers need visual emphasis on first impression+- Annual reports, dashboards, and SaaS landing pages showing key figures+- Any context where "the number settling into place" communicates arrival rather than a static display+- Loading sequences where counters fill in as data resolves++## How it works++An IntersectionObserver watches the stats container and fires when it crosses a configurable threshold inside the internal scroll viewport:++```js+const margin = -(100 - threshold); // e.g. threshold 60 → margin -40+observer = new IntersectionObserver(([e]) => {+ if (e.isIntersecting && !running) animateCounters();+}, { root: stage, rootMargin: `0px 0px ${margin}% 0px`, threshold: 0 });+observer.observe(document.getElementById('stats'));+```++`root: stage` is essential — the stage scrolls internally. Without it, the observer defaults to the document viewport and never fires because the stats element is always "visible" at the page level.++The rAF loop interpolates from 0 to target using elapsed time and an easing function:++```js+function frame(now) {+ const t = Math.min((now - start - delay) / duration, 1);+ const v = target * easeFn(t);+ el.textContent = format(v); // formatted every frame+ if (t < 1) requestAnimationFrame(frame);+}+requestAnimationFrame(frame);+```++Formatting happens on every frame — not just at the end. This ensures commas, currency symbols, and units appear throughout the animation, not suddenly at the final value.++## Key parameters++| Parameter | Default | Effect |+|-----------|---------|--------|+| Trigger threshold | 60% | How far the section must enter the viewport before firing |+| Duration | 1800ms | Total count-up time per counter |+| Easing | easeOutCubic | Controls the deceleration curve |+| Stagger | 200ms | Delay added per counter index when stagger is enabled |++Easing functions available:++```js+const EASE = {+ linear: t => t,+ outCubic: t => 1 - (1 - t) ** 3,+ outExpo: t => t === 1 ? 1 : 1 - Math.pow(2, -10 * t),+ outBack: t => { const c = 1.70158; return 1 + (c+1)*Math.pow(t-1,3) + c*Math.pow(t-1,2) }+};+```++## Production notes++- **`root` must point to the internal scroll container, not the document.** If the stats section lives inside a custom scroll container, `root: null` (the default) observes against the page viewport — the section appears "in view" immediately and the observer never fires on actual scroll. Always pass `root: stage` (or whichever element has `overflow-y: scroll`).+- **`rootMargin` percentages are relative to the root's bounding box.** With `root: stage`, `-40%` means 40% of the stage height, not the window. This keeps the threshold position consistent regardless of the window size.+- **Format every frame, not just at the end.** Formatting only on completion causes a jarring jump from raw decimal to formatted string. A counter running 0 → 12,847 should show commas from the first frame it crosses 1,000.+- **`easeOutBack` overshoots.** The value briefly exceeds the target before settling. For counters this means the display may show a number higher than the target for a frame or two. Use `outCubic` or `outExpo` when the target value must never be exceeded visually.+- **GSAP equivalent:** `gsap.to(obj, { val: target, duration: 1.8, ease: "power3.out", onUpdate: () => el.textContent = format(obj.val) })`. CountUp.js is a dedicated library for this pattern with locale-aware formatting built in.++## See also++- [Reveal on Scroll](../reveal-on-scroll/) — IntersectionObserver used for entrance animations rather than counter triggers.+- [Stagger Reveal](../stagger-reveal/) — coordinating multiple elements with cascading delays on the same IO trigger.diff --git a/animations/01-scroll-based/horizontal-scroll/README.md b/animations/01-scroll-based/horizontal-scroll/README.mdnew file mode 100644index 00000000..6b69c58f--- /dev/null+++ b/animations/01-scroll-based/horizontal-scroll/README.md@@ -0,0 +1,73 @@+# Horizontal Scroll++[Live demo](index.html)++## What it is++A horizontal panel strip driven entirely by vertical scroll. While the user scrolls through a tall pinned section, an inner horizontal track translates left proportionally, making panels slide past as if on a conveyor belt. No horizontal scroll container is involved — the user's native vertical scroll is preserved and converted into horizontal motion via translateX.++## When to use it++- Portfolio project showcases where each panel is a distinct featured work+- Feature walkthroughs where lateral movement reinforces a "moving through" narrative+- Timelines, process flows, or numbered steps that benefit from a left-to-right reading order+- Any context where you want horizontal navigation without requiring users to scroll horizontally or use arrow keys++## How it works++Two formulas do all the work — pin distance and translateX offset.++**Pin section height** determines how much vertical scroll budget exists:++```css+#pin-section { height: calc(var(--stage-h) * var(--panels)); }+/* 5 panels × 620px stage = 3100px tall section */+```++**Track sizing** — the track must be explicitly wider than its container, and each panel must reference the track's width, not the stage's:++```css+#h-track { display: flex; width: calc(var(--panels) * 100%); }+/* 100% here = #pin-inner = stage width; 5 × 100% = 5× stage width */++.panel { flex: 0 0 calc(100% / var(--panels)); }+/* 100% of track ÷ 5 = exactly one stage-width per panel */+```++**Translation on scroll:**++```js+const budget = pinSection.offsetHeight - stage.clientHeight;+const progress = clamp((stage.scrollTop - pinSection.offsetTop) / budget, 0, 1);+const maxShift = track.offsetWidth - stage.clientWidth;+track.style.transform = `translateX(${-progress * maxShift}px)`;+```++**Panel jump links** compute the scroll position that aligns a given panel:++```js+const target = pinSection.offsetTop + (i / (PANELS.length - 1)) * budget;+stage.scrollTo({ top: target, behavior: 'smooth' });+```++## Key parameters++| Parameter | Default | Effect |+|-----------|---------|--------|+| `--panels` | 5 | Number of horizontal panels; controls pin-section height and track width |+| Pin section height | `panels × stage height` | Total vertical scroll distance for the full horizontal traversal |+| Track width | `calc(panels × 100%)` | Must be set explicitly — default auto-width makes `maxShift = 0` |++## Production notes++- **The track must have an explicit width.** Without `width: calc(var(--panels) * 100%)`, the track's `offsetWidth` equals the containing block's width. Then `maxShift = track.offsetWidth - stage.clientWidth = 0` and `translateX` is always zero — the track never moves. This is the single most common failure mode for this pattern.+- **Panel flex-basis must reference track width, not stage width.** `flex: 0 0 100%` where 100% resolves to the container (the track, not the stage) works correctly only after the track has its explicit width. If the track has no explicit width, the flex-basis also collapses.+- **No `overflow: hidden` between the scroll container and the sticky inner.** `position: sticky` stops working if any ancestor between the sticky element and the scroll container has `overflow` set to anything other than `visible`. `#pin-inner` is sticky inside `#pin-section` inside `.stage` — none of the intermediate elements should have `overflow: hidden`.+- **`progress` must be computed from `stage.scrollTop`, not `window.scrollY`.** The scroll container is the internal stage element. Using `window.scrollY` always returns 0.+- **GSAP ScrollTrigger equivalent:** `ScrollTrigger.create({ trigger, start, end, scrub: true, onUpdate: self => track.style.transform = 'translateX(...)' })`. Horizontal scroll sections also appear in Locomotive Scroll and Lenis as first-class features.+- **Mobile consideration.** The pin-section on mobile is `panels × 480px = 2400px` tall for 5 panels. Test that this feels natural on touch — the ratio of vertical scroll to horizontal travel determines perceived "resistance". Faster travel (fewer panels per px) feels lighter; slower (more panels) can feel sticky.++## See also++- [Sticky Section](../sticky-section/) — a related pin pattern where the content morphs through states instead of translating.+- [Scrub Animation](../scrub-animation/) — another scrub-to-scroll pattern, applied to element transforms rather than layout translation.diff --git a/animations/01-scroll-based/progress-bar/README.md b/animations/01-scroll-based/progress-bar/README.mdnew file mode 100644index 00000000..c508cecd--- /dev/null+++ b/animations/01-scroll-based/progress-bar/README.md@@ -0,0 +1,78 @@+# Progress Bar++[Live demo](index.html)++## What it is++A reading progress indicator that fills as the user scrolls through an article. The demo implements three visual styles — a horizontal top bar, a circular ring, and a vertical side rail — all driven by the same formula. Switching styles is a display toggle; the underlying progress value and scroll listener are shared.++## When to use it++- Long-form articles, documentation pages, and tutorials where readers benefit from knowing how far through they are+- Single-page presentations or reports with a defined start and end+- Any scrollable content area where a completion signal improves the reading experience+- Onboarding flows where progress communicates "almost done"++## How it works++The formula is constant regardless of which indicator style is active:++```js+stage.addEventListener('scroll', () => {+ if (!ticking) { requestAnimationFrame(update); ticking = true; }+}, { passive: true });++function update() {+ const p = stage.scrollTop / (stage.scrollHeight - stage.clientHeight);+ topBar.style.transform = `scaleX(${p})`; // top bar+ sideFill.style.height = Math.round(p * 100) + '%'; // side rail+ circFg.style.strokeDashoffset = CIRC - (p * CIRC); // circle (CIRC = 2πr)+ ticking = false;+}+```++**Indicator positioning.** All three indicators are `position: absolute` children of `.stage-wrap` (the `position: relative` wrapper around the scroll container), not children of the scroll container itself:++```html+<div class="stage-wrap"> <!-- position: relative; overflow: hidden -->+ <div id="top-bar"></div> <!-- absolute, top:0, left:0, right:0 -->+ <div id="side-rail">...</div> <!-- absolute, top:0, right:0, bottom:0 -->+ <svg id="circ">...</svg> <!-- absolute, top:8px, right:8px -->+ <div class="stage" id="stage"> <!-- overflow-y: scroll -->+ <div class="article">...</div>+ </div>+</div>+```++`overflow: hidden; border-radius: 8px` on `.stage-wrap` clips all three indicators to the stage boundary.++**Circular indicator** uses SVG `stroke-dashoffset`:++```js+const CIRC = 2 * Math.PI * 16; // circumference = 100.53 for r=16+circFg.style.strokeDashoffset = CIRC - (p * CIRC);+// at p=0: offset = CIRC → ring fully hidden+// at p=1: offset = 0 → ring fully shown+```++## Key parameters++| Parameter | Default | Effect |+|-----------|---------|--------|+| Indicator style | top bar | Which visual indicator is active |+| Bar color | `#58a6ff` | Applied via `--bar-color` CSS custom property |+| Bar thickness | 3px | Applied via `--bar-thick` CSS custom property; also updates SVG `stroke-width` |++## Production notes++- **Read scroll position from the internal viewport, not `window.scrollY`.** If the article is inside a custom scroll container (as in this demo), `window.scrollY` is always 0 — the page itself never scrolls. The formula must use `stage.scrollTop` and `stage.scrollHeight / stage.clientHeight` from the actual scroll element.+- **Indicators must not be inside the scroll container.** `position: absolute` elements inside an `overflow-y: scroll` container scroll with the content — they disappear as the user reads. Place indicators in a `position: relative` wrapper that is a sibling (or parent) of the scroll container, not a child.+- **Use `transform: scaleX()` for the top bar, not `width`.** Animating `width` causes layout recalculation on every frame. `scaleX` is compositor-promoted and runs off the main thread. Set `transform-origin: left` so it grows from the leading edge.+- **The rAF dirty flag is mandatory.** Scroll events fire faster than display refresh (60–120 Hz on mobile). Without the `ticking` flag, DOM writes pile up multiple times per frame and cause visual tearing on lower-end devices.+- **JavaScript string literals containing apostrophes must use double-quote delimiters or escaped apostrophes.** A single-quoted string like `'it's working'` causes a SyntaxError — the parser sees `'it'` as the complete string, then `s working'` as an error. Use `"it's working"` or `'it\'s working'` instead.+- **Framer Motion equivalent:** `const { scrollYProgress } = useScroll({ container: ref }); scaleX: scrollYProgress` applied to a motion div. GSAP: `gsap.to(bar, { scaleX: () => scrollProgress, ease: "none", scrollTrigger: { scrub: true } })`.++## See also++- [Scrub Animation](../scrub-animation/) — the same scroll-progress formula applied to element transforms rather than a progress indicator.+- [Sticky Section](../sticky-section/) — uses internal scroll progress to drive state transitions rather than a fill indicator.diff --git a/index.html b/index.htmlindex 94ebc56f..d00f9845 100644--- a/index.html+++ b/index.html@@ -5,64 +5,138 @@<meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Animation Atlas</title><style>- :root { --bg: #060a10; --text: #c9d1d9; --muted: #8b949e; --accent: #58a6ff; }- *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }- body { background: var(--bg); color: var(--text); font-family: monospace; padding: 48px 32px; max-width: 720px; margin: 0 auto; }- h1 { font-size: 18px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 8px; }- .subtitle { font-size: 12px; color: var(--muted); margin-bottom: 48px; }- h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin: 32px 0 12px; }- ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }- a { color: var(--accent); text-decoration: none; font-size: 13px; }- a:hover { text-decoration: underline; }- .desc { font-size: 11px; color: var(--muted); margin-top: 2px; }+ :root{--bg:#060a10;--text:#c9d1d9;--muted:#8b949e;--accent:#58a6ff;--border:#21262d;--ui-bg:#0d1117}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ body{background:var(--bg);color:var(--text);font-family:monospace;padding:clamp(24px,5vw,64px) clamp(16px,4vw,48px);max-width:800px;margin:0 auto}+ .hero{margin-bottom:clamp(32px,6vw,64px);padding-bottom:32px;border-bottom:1px solid var(--border)}+ h1{font-size:clamp(14px,2vw,18px);letter-spacing:3px;text-transform:uppercase;margin-bottom:10px}+ .hero-sub{font-size:clamp(11px,1.4vw,13px);color:var(--muted);line-height:1.6;max-width:480px;margin-bottom:16px}+ .hero-link{font-size:11px;color:var(--accent);text-decoration:none;letter-spacing:1px}+ @media(hover:hover){.hero-link:hover{text-decoration:underline}}+ .category{margin-bottom:clamp(24px,4vw,48px)}+ h2{font-size:10px;text-transform:uppercase;letter-spacing:2px;color:var(--muted);margin-bottom:16px;padding-bottom:8px;border-bottom:1px solid var(--border)}+ ul{list-style:none;display:flex;flex-direction:column;gap:2px}+ .entry{border-radius:6px;overflow:hidden}+ .entry a{display:block;padding:12px 14px;color:var(--accent);text-decoration:none;font-size:clamp(11px,1.4vw,13px);background:var(--ui-bg);border:1px solid transparent;transition:border-color .15s}+ @media(hover:hover){.entry a:hover{border-color:var(--border)}}+ .entry a .name{font-weight:bold;margin-bottom:3px}+ .entry a .desc{font-size:10px;color:var(--muted);line-height:1.5}+ .coming-soon{padding:10px 14px;font-size:11px;color:var(--muted);background:var(--ui-bg);border-radius:6px;opacity:.4;letter-spacing:1px}+ @media(max-width:600px){body{padding:20px 16px}}</style></head><body>- <h1>Animation Atlas</h1>- <p class="subtitle">A visual reference of web animation techniques.</p>+ <div class="hero">+ <h1>Animation Atlas</h1>+ <p class="hero-sub">A visual reference of web animation techniques. Each entry is a self-contained demo with an explanation of the mechanic — open an HTML file, it runs offline.</p>+ <a class="hero-link" href="https://github.com/matinmonshizadeh/animation-handbook">github.com/matinmonshizadeh/animation-handbook →</a>+ </div>- <h2>01 — Scroll-Based</h2>- <ul>- <li>- <a href="animations/01-scroll-based/parallax-depth-of-field/">Parallax Depth-of-Field</a>- <span class="desc" style="display:block">Five mountain layers with parallax translation and blur-based depth-of-field driven by scroll.</span>- </li>- <li>- <a href="animations/01-scroll-based/parallax-scrolling/">Parallax Scrolling</a>- <span class="desc" style="display:block">Four SVG layers at different scroll speeds create a 3D depth illusion; adjustable speed sliders show how ratios make or break the effect.</span>- </li>- <li>- <a href="animations/01-scroll-based/reverse-scrolling-columns/">Reverse-Scrolling Columns</a>- <span class="desc" style="display:block">A center column scrolls normally while two flanking columns scroll in reverse, looping infinitely — the opposing motion creates strong directional depth contrast.</span>- </li>- <li>- <a href="animations/01-scroll-based/cover-card-to-fixed-header/">Cover Card to Fixed Header</a>- <span class="desc" style="display:block">A hero cover card scrubs into a compact fixed header on scroll — height, font size, opacity, and blur all driven by a single eased progress value.</span>- </li>- <li>- <a href="animations/01-scroll-based/fly-in-fly-out-contact-list/">Fly-in Fly-out Contact List</a>- <span class="desc" style="display:block">Contact rows translate and fade through entry, active, and exit zones as you scroll — a continuous bidirectional effect scrubbed to scroll position.</span>- </li>- <li>- <a href="animations/01-scroll-based/stacking-cards/">Stacking Cards</a>- <span class="desc" style="display:block">Cards stack as they overlap — position: sticky handles the layering, scroll drives depth cues via scale and brightness.</span>- </li>- <li>- <a href="animations/01-scroll-based/scroll-trigger/">ScrollTrigger Animation</a>- <span class="desc" style="display:block">The onEnter / onLeave lifecycle demonstrated with vanilla JS — four zones showing fade-on-enter, scrub, pin+scrub, and snap.</span>- </li>- <li>- <a href="animations/01-scroll-based/scrub-animation/">Scrub Animation</a>- <span class="desc" style="display:block">A camera lens disassembles in five stages as you scroll — every transform welded to scroll position, no autoplay.</span>- </li>- <li>- <a href="animations/01-scroll-based/pin-animation/">Pin Animation</a>- <span class="desc" style="display:block">A phone mockup pins to the viewport while four features swap in sequence — CSS position: sticky, no JavaScript pinning.</span>- </li>- <li>- <a href="animations/01-scroll-based/snap-scrolling/">Snap Scrolling</a>- <span class="desc" style="display:block">CSS scroll-snap-type creates a paginated, magnetic feel — switch between mandatory, proximity, and none to feel the difference.</span>- </li>- </ul>+ <div class="category">+ <h2>01 — Scroll-Based</h2>+ <ul>+ <li class="entry"><a href="animations/01-scroll-based/parallax-depth-of-field/">+ <div class="name">Parallax Depth-of-Field</div>+ <div class="desc">Five mountain layers with parallax translation and blur-based depth-of-field driven by scroll progress.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/parallax-scrolling/">+ <div class="name">Parallax Scrolling</div>+ <div class="desc">Four SVG layers at different scroll speeds create a 3D depth illusion; adjustable speed multipliers show how ratios make or break the effect.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/reverse-scrolling-columns/">+ <div class="name">Reverse-Scrolling Columns</div>+ <div class="desc">A center column scrolls normally while two flanking columns scroll in reverse, looping infinitely — opposing motion creates strong directional contrast.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/cover-card-to-fixed-header/">+ <div class="name">Cover Card to Fixed Header</div>+ <div class="desc">A hero cover card scrubs into a compact fixed header on scroll — height, font size, opacity, and blur all driven by a single eased progress value.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/fly-in-fly-out-contact-list/">+ <div class="name">Fly-in Fly-out Contact List</div>+ <div class="desc">Contact rows translate and fade through entry, active, and exit zones as you scroll — a continuous bidirectional effect scrubbed to scroll position.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/stacking-cards/">+ <div class="name">Stacking Cards</div>+ <div class="desc">Cards fan into a deck as they stack — per-index sticky offset creates the peek tab, CSS Scroll-Driven Animations drive the scale.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/scroll-trigger/">+ <div class="name">ScrollTrigger Animation</div>+ <div class="desc">The onEnter / onLeave lifecycle demonstrated with vanilla JS — four zones showing fade-on-enter, scrub, pin+scrub, and snap.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/scrub-animation/">+ <div class="name">Scrub Animation</div>+ <div class="desc">A camera lens disassembles in five stages as you scroll — every transform welded to scroll position, no autoplay, perfectly reversible.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/pin-animation/">+ <div class="name">Pin Animation</div>+ <div class="desc">A phone mockup pins to the viewport while four features swap in sequence — CSS position: sticky, no JavaScript pinning.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/snap-scrolling/">+ <div class="name">Snap Scrolling</div>+ <div class="desc">CSS scroll-snap-type creates a paginated, magnetic feel — switch between mandatory, proximity, and none to feel the difference.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/scrollytelling/">+ <div class="name">Scrollytelling</div>+ <div class="desc">Fractional chapter progress drives continuous depth crossfades across six ocean-layer chapters — the porthole visual responds between discrete states.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/reveal-on-scroll/">+ <div class="name">Reveal on Scroll</div>+ <div class="desc">Seven reveal techniques (fade, slide, scale, blur, clip-path mask, stagger) fired by IntersectionObserver at a configurable trigger line.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/stagger-reveal/">+ <div class="name">Stagger Reveal</div>+ <div class="desc">Groups reveal sequentially with cascading delays — forward, reverse, center-out, and random directions across a grid, list, and chip set.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/horizontal-scroll/">+ <div class="name">Horizontal Scroll</div>+ <div class="desc">Vertical scroll translates a horizontal panel strip — a tall pinned section provides the scroll budget, translateX does the work.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/sticky-section/">+ <div class="name">Sticky Section</div>+ <div class="desc">The whole section pins to the viewport while its interior morphs through four states scrubbed to scroll position within the section.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/counter-animation/">+ <div class="name">Counter Animation</div>+ <div class="desc">Numbers count 0 → target with easing when the stats section enters the internal viewport — four formats, configurable easing, stagger support.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/progress-bar/">+ <div class="name">Progress Bar</div>+ <div class="desc">Reading progress indicator in three styles: top bar, circular ring, and side rail — all driven by scrollTop / (scrollHeight − clientHeight).</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/section-wipe/">+ <div class="name">Section Wipe</div>+ <div class="desc">The next section slides over the current one via sticky z-index stacking — a scale-down on the receding layer adds depth to the transition.</div>+ </a></li>+ <li class="entry"><a href="animations/01-scroll-based/zoom-into-image/">+ <div class="name">Zoom Into Image</div>+ <div class="desc">clip-path expands from a framed card to full-bleed as you scroll — the portal effect is inset() collapsing from center outward.</div>+ </a></li>+ </ul>+ </div>++ <div class="category">+ <h2>02 — Transitions</h2>+ <div class="coming-soon">Coming soon</div>+ </div>++ <div class="category">+ <h2>03 — Micro-Interactions</h2>+ <div class="coming-soon">Coming soon</div>+ </div>++ <div class="category">+ <h2>04 — Text & Typography</h2>+ <div class="coming-soon">Coming soon</div>+ </div>++ <div class="category">+ <h2>05 — 3D & Advanced</h2>+ <div class="coming-soon">Coming soon</div>+ </div>++ <div class="category">+ <h2>06 — Ambient & Background</h2>+ <div class="coming-soon">Coming soon</div>+ </div></body></html>