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: rewrite the Entrance & Exit explanations in plain language
matin1dc7987bbaa7
diff --git a/animations/02-entrance-and-exit/blur-in/README.md b/animations/02-entrance-and-exit/blur-in/README.mdindex 6f9bf5a2..da2f480c 100644--- a/animations/02-entrance-and-exit/blur-in/README.md+++ b/animations/02-entrance-and-exit/blur-in/README.md@@ -1,7 +1,8 @@# Blur In## What it is-Blur In fades an element into view while transitioning it from a heavy blur to sharp focus, mimicking a camera pulling focus onto a subject. The simultaneous rise in opacity and drop in blur radius reads as cinematic because it echoes how real optics resolve an image, rather than the flat cross-fade of a plain opacity transition.++Blur In fades an element into view while it sharpens from a heavy blur to crisp focus, like a camera pulling focus onto a subject. The rising opacity and falling blur feel cinematic because they echo how a real lens resolves an image, unlike the flat look of a plain fade.## When to use it- Hero cards, modals, and single focal elements entering a view@@ -32,12 +33,14 @@ card.classList.add('in');The blur-only and fade-only modes exist to show that the two channels are separable — blur alone feels like focus without arrival, fade alone is the ordinary transition. Combined, they read as a lens finding its subject.## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Starting blur (`--blur-start`) | 20px | Higher = more dramatic focus pull; over ~30px starts to look like frosted glass |-| Duration (`--dur`) | 700ms | Blur benefits from a slower curve than a plain fade — the optics feel takes time |-| Easing (`--ease`) | Ease out | Deceleration mimics a lens settling; linear feels robotic |-| Upward translate (`--ty`) | -8px | Small `translateY` adds a sense of the element rising into focus |+| Mode | Blur + Fade | The full effect; Blur only and Fade only show each half on its own |+| Starting blur | 20px | Higher is a more dramatic focus pull; past about 30px it looks like frosted glass |+| Duration | 700ms | Blur needs a little longer than a plain fade for the lens feel to land |+| Easing | Ease out | Slowing down mimics a lens settling; Linear feels robotic |+| Slight upward drift | on | A small rise while it sharpens, as if it is settling into place |## Production notes- **GPU cost**: `filter: blur()` is one of the more expensive properties to animate. It forces the element onto its own compositor layer and re-rasterizes each frame. Limit blur-in to a single hero element or a small group — never a long list, and be cautious on low-end mobile.diff --git a/animations/02-entrance-and-exit/bounce-in/README.md b/animations/02-entrance-and-exit/bounce-in/README.mdindex eb58c816..b050bb67 100644--- a/animations/02-entrance-and-exit/bounce-in/README.md+++ b/animations/02-entrance-and-exit/bounce-in/README.md@@ -1,7 +1,8 @@# Bounce In## What it is-Bounce In brings an element up from small and low, overshoots its final size and position, then springs back to rest — the motion of something landing with momentum. Crucially, a real bounce is not a single easing curve: it is a series of hand-placed `@keyframes` waypoints, each defining an overshoot and settle, because one `cubic-bezier` can only overshoot once.++Bounce In brings an element up from small and low, overshoots its final size and position, then springs back to rest, like something landing with momentum. A real bounce isn't one smooth curve: it's a few hand-placed steps, each going a little past the target and coming back.## When to use it- Playful confirmations — a success badge, a "message sent" checkmark, an added-to-cart chip@@ -31,12 +32,13 @@ kf=`@keyframes bounce-in{The generated CSS is injected into a live `<style>` tag, so changing intensity or bounce count rewrites the keyframe rule on the fly. Two- and three-bounce modes simply add more overshoot/undershoot pairs at tighter percentage intervals, each smaller than the last to imitate energy dissipating.## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Overshoot intensity | 60% | Scales how far past 1.0 the waypoints reach; 0% = no bounce, 100% = exaggerated |-| Duration (`--dur`) | 1100ms | Bounces need room to breathe; too short and the springs read as a jitter |-| Bounces | 1 | Number of overshoot cycles — almost always 1; multiples look cartoonish |-| Combine with fade | on | Whether opacity starts at 0 or the element is already visible while it bounces |+| Overshoot intensity | 60% | How far past full size it grows; 0% means no bounce, 100% is exaggerated |+| Duration | 1100ms | Bounces need room to breathe; too short and the spring reads as a jitter |+| Bounces | 1× Single | How many times it overshoots; almost always one, since more looks cartoonish |+| Combine with fade | on | Whether it fades in while it bounces or is visible from the start |## Production notes- **Keyframes over easing**: an overshoot spring like `cubic-bezier(.34,1.56,.64,1)` gives *one* overshoot. Genuine multi-stage bounce and squash-and-stretch require explicit waypoints — that is the whole reason this technique uses `@keyframes`.diff --git a/animations/02-entrance-and-exit/clip-path-reveal/README.md b/animations/02-entrance-and-exit/clip-path-reveal/README.mdindex 6bdb76a7..cdaf196b 100644--- a/animations/02-entrance-and-exit/clip-path-reveal/README.md+++ b/animations/02-entrance-and-exit/clip-path-reveal/README.md@@ -1,7 +1,8 @@# Clip-Path Reveal## What it is-A clip-path reveal uncovers an element by animating a mask shape from small (or edge-hidden) to fully open. The element is painted in full the entire time — only the visible region grows. Because nothing moves or fades, the content stays crisp and in place while a shape wipes across it, which is what gives the effect its cinematic, editorial feel.++A clip-path reveal uncovers an element by growing a mask shape until the whole element shows. The element is fully drawn the entire time; only the visible part grows. Because nothing moves or fades, the content stays crisp and in place while a shape wipes across it, which gives the effect its cinematic, editorial feel.## When to use it- Image and media reveals on scroll (a photo wiped open left-to-right)@@ -37,12 +38,13 @@ const CLIPS = {```## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Shape | inset | `inset` (edge wipe), `circle` / `ellipse` (iris), `polygon` (angled swipe) |-| Direction | left | For `inset`, which edge the wipe travels from |-| Duration | 800ms | Reveals read best slower than a fade — the wipe needs to be seen |-| Easing | `cubic-bezier(.2,.7,.3,1)` | A smooth decel; the wipe eases to a stop rather than snapping |+| Shape | Inset | Inset wipes in from an edge, Circle and Ellipse open like an iris, Swipe cuts in at an angle |+| Direction | Left | For the Inset shape, which side the wipe travels in from |+| Duration | 800ms | A reveal reads best a little slower than a fade, so the wipe can be seen |+| Easing | Smooth | The wipe slows to a stop instead of snapping |## Production notes- **Interpolate compatible shapes only.** CSS can animate `inset`→`inset`, `circle`→`circle`, or `polygon`→`polygon` (with the same vertex count), but it cannot tween *between* shape functions. Keep `out` and `in` the same function, as the demo does.diff --git a/animations/02-entrance-and-exit/curtain-reveal/README.md b/animations/02-entrance-and-exit/curtain-reveal/README.mdindex 32367fbe..72499e6e 100644--- a/animations/02-entrance-and-exit/curtain-reveal/README.md+++ b/animations/02-entrance-and-exit/curtain-reveal/README.md@@ -1,7 +1,8 @@# Curtain Reveal## What it is-A curtain reveal is a three-stage transition: an opaque bar slides across content to cover it, pauses, then slides off the far side to expose it. Unlike a clip-path reveal, the content is genuinely hidden behind the moving panel and then uncovered, so the eye registers a distinct before/after moment. It is theatrical by design and suits content that warrants the drama.++A curtain reveal happens in three steps: a solid panel slides across the content to cover it, pauses, then slides off the far side to show it. Unlike a clip-path reveal, the content really is hidden behind the moving panel and then uncovered, so the eye notices a clear before and after. It is theatrical on purpose and suits content that deserves the drama.## When to use it- Page and section transitions where a colored panel wipes across between views@@ -33,13 +34,14 @@ setTimeout(() => { // stage B: pauseThe `101%` (rather than `100%`) guarantees the bar clears the edge completely with no sub-pixel seam.## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Curtain speed | 500ms | Time for one pass (enter or exit); the whole reveal is ~2×speed + pause |-| Pause between | 300ms | The beat the bar covers everything — this is what makes the change register |-| Direction | L→R | Horizontal (`ltr`/`rtl`) or vertical (`ttb`/`btt`) travel |-| Two curtains | off | Split mode: two halves enter from opposite sides and part |-| Curtain color | dark | The panel color — high contrast with the content heightens the drama |+| Curtain speed | 500ms | Time for one pass; the whole reveal takes about two passes plus the pause |+| Pause between | 300ms | The beat where the panel covers everything; it is what makes the change register |+| Direction | Left to right | Which way the panel travels, across or up and down |+| Two curtains (split) | off | Two panels meet in the middle, then part |+| Curtain color | Dark | Strong contrast with the content makes the reveal more dramatic |## Production notes- **Overshoot the edge with `101%`.** Ending an exit exactly at `100%` can leave a 1px sliver on fractional-DPI displays; the extra percent is the standard fix.diff --git a/animations/02-entrance-and-exit/fade-in-out/README.md b/animations/02-entrance-and-exit/fade-in-out/README.mdindex e6138db0..f09b602d 100644--- a/animations/02-entrance-and-exit/fade-in-out/README.md+++ b/animations/02-entrance-and-exit/fade-in-out/README.md@@ -1,7 +1,8 @@# Fade In / Fade Out## What it is-A fade transitions an element's `opacity` between 0 and 1 — 0→1 to enter, 1→0 to exit. It is the simplest entrance animation and the cheapest to run: the compositor blends the already-painted layer, so no re-layout or re-paint is triggered. Because it carries no direction or shape, a fade reads as a neutral "appear" rather than a "move."++A fade changes an element's opacity between invisible and fully visible: it fades in to appear and fades out to leave. It is the simplest entrance animation and one of the cheapest to run, because the browser only blends a layer it has already drawn. Since nothing moves or changes shape, a fade reads as a neutral appearance rather than a movement.## When to use it- Modal, tooltip, and popover appearance where a subtle presence change is enough@@ -30,12 +31,13 @@ card.classList.add('in');```## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Duration | 600ms | Under 150ms barely registers; over 1s feels sluggish for UI |-| Easing | `ease-out` | Fast start, gentle settle — the natural feel for an entrance |-| Hold time | 800ms | How long the element stays visible before the auto-loop fades it out |-| Auto-loop | off | Cycles in → hold → out for demonstration |+| Duration | 600ms | Under 150ms barely registers; over a second feels slow for interface elements |+| Easing | Ease out | Starts fast and settles gently, the natural feel for an entrance |+| Hold time | 0.8s | How long the element stays visible before Auto-loop fades it out again |+| Auto-loop | off | Repeats in, hold and out so you can watch it again |## Production notes- **Animate `opacity`, nothing else.** It is compositor-only, so a fade holds 60fps even on low-end mobile. Fading `visibility` or `display` instead does not animate at all — those are discrete properties.diff --git a/animations/02-entrance-and-exit/flip-in/README.md b/animations/02-entrance-and-exit/flip-in/README.mdindex 273dc427..de01ca5c 100644--- a/animations/02-entrance-and-exit/flip-in/README.md+++ b/animations/02-entrance-and-exit/flip-in/README.md@@ -1,7 +1,8 @@# Flip In## What it is-Flip In rotates an element from an edge-on flat plane into full view, using CSS 3D transforms to make the card appear to swing toward the viewer like a hinged panel. The defining detail is that `perspective` lives on the *parent* container, not the rotating card — without it, a `rotateY` collapses into a flat horizontal squash with no sense of depth.++Flip In swings an element from edge-on into full view in 3D, like a hinged panel turning toward you. The key detail is that the 3D perspective is set on the element's container, not on the card itself; without it, the turn collapses into a flat squash with no sense of depth.## When to use it- Card entrances in dashboards, galleries, and onboarding flows@@ -34,13 +35,16 @@ document.documentElement.style.setProperty('--rot-x',rx);`transform-origin` moves the hinge to an edge (top, bottom, left) so the card swings from that side rather than pivoting around its center.## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Perspective (`--persp`, on parent) | 1000px | Viewer distance; lower = more dramatic foreshortening, higher = subtle |-| Starting rotation (`--rot-y` / `--rot-x`) | 90° | The flat-plane angle to open from; 90° starts fully edge-on |-| Flip axis | Y (horizontal) | Which axis carries the rotation — Y hinge, X hinge, or both |-| Transform origin | center | Where the hinge sits; an edge origin swings the card from that side |-| Duration (`--dur`) | 600ms | Springy easing here adds a satisfying settle at the end |+| Flip axis | Y (horiz) | Which way it swings: around a vertical hinge, a horizontal one, or both |+| Starting rotation | 90° | The angle it starts from; 90° starts fully edge-on |+| Perspective | 1000px | How far away the viewer seems; lower is more dramatic, higher is subtler |+| Duration | 600ms | How long the swing takes; a Springy curve adds a satisfying settle |+| Easing | Ease out | Slows the swing as it comes to face you |+| Transform origin | Center | Where the hinge sits; an edge makes it swing from that side |+| Combine with fade | on | Fades it in while it turns |## Production notes- **Perspective belongs on the parent**: this is the single most common mistake. Setting `perspective` on the card itself (via `transform: perspective(...)`) applies per-element and won't share a vanishing point across siblings; the container `perspective` property is what creates a coherent 3D scene.diff --git a/animations/02-entrance-and-exit/letter-by-letter-stagger/README.md b/animations/02-entrance-and-exit/letter-by-letter-stagger/README.mdindex 47b7f19f..a427acde 100644--- a/animations/02-entrance-and-exit/letter-by-letter-stagger/README.md+++ b/animations/02-entrance-and-exit/letter-by-letter-stagger/README.md@@ -1,7 +1,8 @@# Letter-by-Letter Stagger## What it is-A letter-by-letter stagger splits a string into individual characters and animates each one on a slightly later schedule, so the phrase assembles as a cascade rather than appearing all at once. The demo offers two implementations of the same idea: a CSS *cascade* driven by per-letter `transition-delay`, and a JS *typewriter* that reveals characters one at a time behind a blinking cursor.++A letter-by-letter stagger animates each character a moment after the previous one, so a phrase assembles as a cascade instead of appearing all at once. The demo shows two versions: a cascade where every letter plays a small entrance, and a typewriter that reveals letters one at a time behind a blinking cursor.## When to use it- Hero headlines and landing-page titles where the text is the focal point@@ -34,12 +35,14 @@ Each character is wrapped in its own `<span class="char">` and given a custom prAdding the `.done` class flips every letter to its resting state simultaneously; the staggered `transition-delay` is what spreads the visible motion out over time. The typewriter mode skips transitions entirely and instead uses a chain of `setTimeout` calls to toggle a `.visible` class on each character in sequence.## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Per-letter delay (`--stagger`) | 35ms | Gap between successive letters; higher = slower, more theatrical cascade |-| Duration per letter (`--dur`) | 400ms | How long each individual letter takes to settle |-| Per-letter animation | Fade up | The transform each letter animates from: fade, scale, or `rotateY` |-| Total time | `n × stagger + dur` | Full runtime grows linearly with character count |+| Mode | Cascade | Cascade animates every letter in turn; Typewriter types them out behind a cursor |+| Per-letter animation | Fade up | The entrance each letter plays in Cascade mode: fade up, fade, scale or rotate |+| Per-letter delay | 35ms | Gap between letters; higher is slower and more theatrical |+| Duration per letter | 400ms | How long each letter takes to settle |+| Show cursor (typewriter) | on | The blinking cursor in Typewriter mode |## Production notes- **Accessibility**: split text still reads as separate spans to most screen readers, but wrapping the whole phrase in an `aria-label` on the container and hiding the spans with `aria-hidden` guarantees the label is announced as one string. The demo honors `prefers-reduced-motion` by forcing all letters visible with no transition.diff --git a/animations/02-entrance-and-exit/rotate-in/README.md b/animations/02-entrance-and-exit/rotate-in/README.mdindex e1457e60..b0e11f67 100644--- a/animations/02-entrance-and-exit/rotate-in/README.md+++ b/animations/02-entrance-and-exit/rotate-in/README.md@@ -1,7 +1,8 @@# Rotate In## What it is-Rotate In spins an element around its center as it enters, usually combined with a scale-up so it reads as *arriving* rather than merely turning in place. Because the rotation is most legible when the shape looks coherent at every angle, the technique is best suited to radially symmetric marks — icons, stars, gears, badges — and poorly suited to text or wide rectangles.++Rotate In spins an element around its center as it enters, usually while it grows from small, so it reads as arriving rather than just turning in place. The spin is easiest to follow when the shape looks right at every angle, so it suits round or symmetric marks such as icons, stars, gears and badges, not text or wide rectangles.## When to use it- Icon and badge reveals — achievement unlocks, status indicators, loading-to-done transitions@@ -34,13 +35,16 @@ document.documentElement.style.setProperty('--scale-start',scaleTog.checked?'0':Extra `±360°` turns don't change the resting frame — the element always lands at `rotate(0deg)` — but they add complete revolutions to the journey, turning a subtle tilt into a full spin.## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Starting rotation (`--rot-start`) | -180° | The angle the element opens from; larger = more spin |-| Extra full rotations | 0× | Adds complete `±360°` turns without altering the landing frame |-| Direction | CCW | Sign of the rotation — clockwise or counter-clockwise |-| Easing (`--ease`) | Springy `cubic-bezier(.34,1.56,.64,1)` | Overshoot makes the spin land rather than glide to a stop |-| Combine with scale | on | Scaling from 0 turns a spin-in-place into an arrival |+| Starting rotation | -180° | The angle it starts from; a larger angle means more spin |+| Extra full rotations | 0× | Adds whole extra turns without changing where it lands |+| Direction | Counter-clockwise | Which way it spins |+| Duration | 600ms | Time for the whole spin |+| Easing | Springy | The overshoot makes the spin land rather than glide to a stop |+| Combine with scale | on | Growing from small turns a spin into an arrival |+| Combine with fade | on | Fades it in as it spins |## Production notes- **Symmetry matters**: rotating text or a rectangle looks like it fell over, not like it entered. The demo deliberately uses a symmetric icon so every intermediate frame reads correctly.diff --git a/animations/02-entrance-and-exit/scale-in/README.md b/animations/02-entrance-and-exit/scale-in/README.mdindex e9b7ded8..3a71db9e 100644--- a/animations/02-entrance-and-exit/scale-in/README.md+++ b/animations/02-entrance-and-exit/scale-in/README.md@@ -1,7 +1,8 @@# Scale In / Zoom In## What it is-A scale-in grows an element from a small start value up to its full `scale(1)`, usually with a fade layered on top. The `transform-origin` decides which point stays anchored while the rest expands, so the element appears to pop from a corner, an edge, or its own center. With springy easing the slight overshoot makes the arrival feel physical, as if the element lands into place.++A scale-in grows an element from a little smaller than its final size up to full size, usually while it fades in. The anchor point decides where it grows from: its own center, an edge or a corner. With a springy curve the slight overshoot makes the arrival feel physical, as if the element lands in place.## When to use it- Modals, dialogs, and popovers zooming up from the control that opened them@@ -27,13 +28,14 @@ The card starts at `scale(var(--ss))` with `opacity: 0` and transitions both toThe default easing is `cubic-bezier(.34,1.56,.64,1)` — its control point above 1 pushes the scale past 1.0 mid-transition before settling, which is the overshoot that reads as a "pop." Changing `--origin` (e.g. to `top left`) re-anchors where that pop expands from.## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Start scale | 0.80 | Closer to 1 is subtle; below 0.5 reads as a big zoom |-| Duration | 500ms | Springy easing needs room to overshoot and settle — under 300ms clips the bounce |-| Easing | Springy `cubic-bezier(.34,1.56,.64,1)` | The overshoot; `ease-out` gives a calmer, flat arrival |-| Transform origin | center | The anchor point the scale grows from |-| Combine with fade | on | Prevents the element flashing at full opacity while still tiny |+| Start scale | 0.80 | Close to 1 is subtle; below 0.5 reads as a big zoom |+| Duration | 500ms | A springy curve needs room to overshoot and settle; under 300ms cuts the bounce short |+| Easing | Springy | Adds the overshoot; Ease out gives a calmer arrival |+| Transform origin | Center | The point the element grows from |+| Combine with fade | on | Stops the element flashing at full strength while it is still tiny |## Production notes- **Anchor the origin to the trigger.** A popover that scales from `center` feels disconnected; setting `transform-origin` to the corner nearest its button makes it feel like it grew *out of* that button.diff --git a/animations/02-entrance-and-exit/slide-in/README.md b/animations/02-entrance-and-exit/slide-in/README.mdindex 0aa677c0..586ba132 100644--- a/animations/02-entrance-and-exit/slide-in/README.md+++ b/animations/02-entrance-and-exit/slide-in/README.md@@ -1,7 +1,8 @@# Slide In## What it is-A slide-in translates an element from an off-screen (or off-position) edge into its final resting place using `transform: translate`. The motion has a direction — top, bottom, left, or right — which reads as the element *arriving* from somewhere. Paired with a simultaneous fade, it feels like natural entry; on its own it can feel mechanical.++A slide-in moves an element from a short distance away into its final place. The motion has a direction (from the top, bottom, left or right), so the element seems to arrive from somewhere. Paired with a fade it feels like a natural entrance; on its own it can feel mechanical.## When to use it- Panels, drawers, and sheets that enter from a screen edge@@ -34,13 +35,14 @@ root.style.setProperty('--fade', withFade ? '0' : '1');```## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Direction | top | Which edge the element travels from |-| Distance | 200px | Travel length — short (20–40px) for subtle UI, long for dramatic entrances |-| Duration | 600ms | Longer distances need longer durations to keep velocity believable |-| Easing | `ease-out` | Decelerate into place; `cubic-bezier(.34,1.56,.64,1)` adds an overshoot |-| Combine with fade | on | Slide alone reads mechanical; the fade makes it read as arrival |+| Direction | Top | Which edge the element travels in from |+| Distance | 200px | Short distances (20 to 40px) suit subtle interface motion; long ones feel dramatic |+| Duration | 600ms | Longer distances need more time so the speed still feels believable |+| Easing | Ease out | Slows down into place; Springy adds a small overshoot |+| Combine with fade | on | A slide alone looks mechanical; the fade makes it read as an arrival |## Production notes- **Use `transform`, never `top`/`left`/`margin`.** Translating stays on the compositor; animating layout properties forces reflow every frame and drops frames on mobile.diff --git a/animations/02-entrance-and-exit/slide-up-reveal/README.md b/animations/02-entrance-and-exit/slide-up-reveal/README.mdindex 1b82d2c7..1051c11c 100644--- a/animations/02-entrance-and-exit/slide-up-reveal/README.md+++ b/animations/02-entrance-and-exit/slide-up-reveal/README.md@@ -1,7 +1,8 @@# Slide Up Reveal## What it is-A slide-up reveal makes a line of text rise into view from behind a fixed clipping boundary, as if emerging from underneath a solid edge. The text moves, but a masked container hides everything below the baseline, so only the arrival is visible. It is the signature typographic entrance for headlines and hero copy.++A slide-up reveal makes a line of text rise into view from behind an invisible edge, as if it is coming up from underneath a surface. The text moves, but everything below the line stays hidden, so only its arrival is visible. It is the classic entrance for headlines and hero copy.## When to use it- Hero and headline copy on landing pages and case studies@@ -30,12 +31,14 @@ Multiple lines stagger through a per-line `--d` index multiplied by a `--stagger```## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Technique | translateY | `translateY(110%)` vs `clip-path: inset(100% 0 0 0)` — same look |-| Duration | 700ms | The rise time per line |-| Easing | `cubic-bezier(.2,.7,.3,1)` | A smooth decel; springy adds a slight settle |-| Line stagger | 60ms | Delay between successive lines — 40–80ms reads as a cascade |+| Technique | Move | Two ways to build it that look identical: moving the text up, or clipping it from below |+| Duration | 700ms | How long each line takes to rise |+| Easing | Smooth | Slows smoothly to a stop; Springy adds a slight settle |+| Line stagger | 60ms | Delay between lines; 40 to 80ms reads as a cascade |+| Multi-line (3 lines) | on | Shows three lines so you can see the stagger |## Production notes- **`translateY(110%)`, not `100%`.** The extra 10% covers descenders (g, y, p) and line-height slack so no sliver of the glyph peeks above the boundary before it moves.diff --git a/animations/02-entrance-and-exit/split-text-reveal/README.md b/animations/02-entrance-and-exit/split-text-reveal/README.mdindex e8112a96..04f0c17e 100644--- a/animations/02-entrance-and-exit/split-text-reveal/README.md+++ b/animations/02-entrance-and-exit/split-text-reveal/README.md@@ -1,7 +1,8 @@# Split Text Reveal## What it is-A split text reveal breaks a string into individual pieces — characters, words, or lines — wraps each in its own element, and animates them one after another with a staggered delay. The stagger is what turns a flat fade into a cascade that flows across the text. It is the foundation of most "kinetic typography" entrances.++A split-text reveal breaks text into pieces (characters, words or lines) and animates them one after another with a short delay between each. That delay turns a flat fade into a cascade that flows across the text. It is the basis of most animated headline entrances.## When to use it- Headline and hero entrances where letters or words ripple into place@@ -39,13 +40,14 @@ The split assigns the index as it builds the spans:Per-unit animation is swappable via `data-anim` (fade-up, fade, scale, rotate); `lines` mode additionally clips each line and slides an inner span up, combining stagger with the slide-up reveal technique.## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Split mode | words | chars = finest cascade, words = readable rhythm, lines = block reveal |-| Animation per unit | fade-up | The motion each piece plays (fade, fade-up, scale, rotate) |-| Stagger delay | 30ms | Delay between units — small values ripple, large values feel deliberate |-| Duration per unit | 500ms | How long each individual piece animates |-| Easing | `cubic-bezier(.2,.7,.3,1)` | Per-unit curve; springy adds a settle on each piece |+| Split mode | Words | Characters give the finest cascade, words a readable rhythm, lines a block reveal |+| Animation per unit | Fade up | The small entrance each piece plays: fade up, fade, scale or rotate |+| Stagger delay | 30ms | Delay between pieces; small values ripple, large values feel deliberate |+| Duration per unit | 500ms | How long each piece takes to animate |+| Easing | Smooth | The curve each piece uses; Springy adds a small settle |## Production notes- **Total time = units × stagger + duration.** Character mode on a long string multiplies fast — 40 chars × 30ms + 500ms is nearly 1.7s. Cap the stagger or switch to words/lines for longer copy so the tail does not drag.diff --git a/animations/02-entrance-and-exit/word-by-word-reveal/README.md b/animations/02-entrance-and-exit/word-by-word-reveal/README.mdindex beed5135..a48b7593 100644--- a/animations/02-entrance-and-exit/word-by-word-reveal/README.md+++ b/animations/02-entrance-and-exit/word-by-word-reveal/README.md@@ -1,7 +1,8 @@# Word-by-Word Reveal## What it is-A word-by-word reveal animates each word of a passage in sequence rather than all together or letter-by-letter. Words are the natural unit of reading, so a stagger of roughly 80–120ms per word tracks how the eye moves through a sentence — slow enough to feel intentional, fast enough not to make the reader wait.++A word-by-word reveal animates each word of a passage in turn, rather than all at once or letter by letter. Words are how people read, so a delay of roughly 80 to 120 milliseconds per word follows the eye through a sentence: slow enough to feel intentional, fast enough that nobody waits.## When to use it- Multi-line body copy, quotes, and paragraph intros where per-letter would be too busy@@ -34,12 +35,14 @@ words.forEach((w,wi)=>{The "sentence pauses" option adds `si × 200ms` to the delay for each sentence, inserting a beat between lines. Because the index is stored as `delay/stagger`, the CSS math stays a single `calc()` regardless of whether pauses are on.## Key parameters+| Parameter | Default | Effect ||-----------|---------|--------|-| Per-word delay (`--stagger`) | 80ms | The reading-speed knob; below ~40ms the stagger blurs into one reveal |-| Duration per word (`--dur`) | 450ms | Settle time for each individual word |-| Easing (`--ease`) | Smooth `cubic-bezier(.2,.7,.3,1)` | Springy overshoot adds bounce; linear feels mechanical |-| Sentence pause | off (+200ms) | Extra delay injected between sentences for paragraph reveals |+| Per-word delay | 80ms | The reading-speed control; below about 40ms the words blur into one reveal |+| Per-word animation | Fade up | The entrance each word plays |+| Duration per word | 450ms | How long each word takes to settle |+| Easing | Smooth | Springy adds a bounce; Linear feels mechanical |+| Sentence pauses | off | Adds an extra pause between sentences |## Production notes- **Whitespace preservation**: keeping a real text node (a literal space) between word spans lets the browser wrap and justify normally, which pure `margin-right` spacing cannot do reliably across fonts.diff --git a/tests/pages.test.js b/tests/pages.test.jsindex 004b9ba6..51f7761f 100644--- a/tests/pages.test.js+++ b/tests/pages.test.js@@ -50,3 +50,33 @@ for (const d of converted) {}});}++const { sections, table } = require('../assets/js/handbook.js');+const PILOT_SLUGS = ['fade-in-out', 'slide-in', 'slide-up-reveal', 'scale-in', 'clip-path-reveal', 'curtain-reveal',+ 'split-text-reveal', 'letter-by-letter-stagger', 'word-by-word-reveal', 'blur-in', 'flip-in', 'bounce-in', 'rotate-in'];++for (const slug of PILOT_SLUGS) {+ test(`README for ${slug} is ready for the site`, () => {+ const dir = path.join(ANIM, PILOT, slug);+ const s = sections(read(path.join(dir, 'README.md')));+ for (const h of ['What it is', 'When to use it', 'Key parameters', 'See also']) assert.ok(s[h], `section ${h}`);+ assert.ok(!s['What it is'].includes('`'), 'What it is has no code');+ assert.ok(!s['Key parameters'].includes('`'), 'Key parameters has no code');+ assert.ok(table(s['Key parameters']).length > 0, 'Key parameters has rows');+ for (const [, href] of s['See also'].matchAll(/\]\(([^)\s]+)\)/g)) {+ assert.ok(isDemoDir(path.resolve(dir, href)), `See also link ${href}`);+ }+ });+}++for (const d of converted.filter(c => c.cat === PILOT)) {+ test(`${d.slug}: every Key parameters name is a control on the page`, () => {+ const html = read(path.join(d.dir, 'index.html'));+ const panel = html.slice(html.indexOf('<section class="hb-settings"'), html.indexOf('<div class="hb-take">')).replace(/<[^>]+>/g, ' ');+ const rows = sections(read(path.join(d.dir, 'README.md')))['Key parameters'].split('\n').slice(2);+ for (const row of rows) {+ const name = (row.split('|')[1] || '').trim();+ if (name) assert.ok(panel.includes(name), `control label "${name}"`);+ }+ });+}