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: Key parameters rows in the scroll, entrance and page-transition READMEs give the values each choice uses in the demo, and Stagger Reveal's delay says a few large cards need a longer wait
matin25a9f14ff36f
diff --git a/animations/01-scroll-based/scroll-background-color/README.md b/animations/01-scroll-based/scroll-background-color/README.mdindex 391fa653..1d91a6d6 100644--- a/animations/01-scroll-based/scroll-background-color/README.md+++ b/animations/01-scroll-based/scroll-background-color/README.md@@ -44,7 +44,7 @@ The scroll handler is rAF-coalesced and performs no layout reads; `maxScroll` is| Parameter | Default | Effect ||-----------|---------|--------|| Colors | Dusk | The palette, one color per section: Dusk stays dark; Daylight passes through pale colors and Forest through a light green, and the text turns dark on those |-| Blend | Gradual | Gradual changes the color the whole way between sections; Quick holds each color and changes it near the boundary; Hard cut switches at the boundary with no blend, to show why the blend matters |+| Blend | Gradual | Gradual changes the color the whole way between sections; Quick holds each color and changes it near the boundary, over the middle 30% of the scroll from one section to the next; Hard cut switches at the boundary with no blend, to show why the blend matters |## Production notesdiff --git a/animations/01-scroll-based/scroll-velocity-skew/README.md b/animations/01-scroll-based/scroll-velocity-skew/README.mdindex 1de0ed7e..34d53956 100644--- a/animations/01-scroll-based/scroll-velocity-skew/README.md+++ b/animations/01-scroll-based/scroll-velocity-skew/README.md@@ -38,7 +38,7 @@ The smoothing is what makes the effect feel physical. Raw deltas would snap the|-----------|---------|--------|| Strength | Normal | How far the rows lean for a given scroll speed: subtle is 0.2°, normal 0.35° and strong 0.6° for each pixel scrolled in a sixtieth of a second || Lean | Tilt | Tilt tips each row like a slope, the classic look; Slant leans it sideways like italic text |-| Spring back | Normal | How quickly the lean follows the scroll speed and fades after you stop; slow feels heavy, quick feels twitchy |+| Spring back | Normal | How quickly the lean follows the scroll speed and fades after you stop: in each sixtieth of a second the lean closes 7% of the gap to the lean the scroll speed calls for when slow, 12% at normal and 20% when quick, so 95% of it is gone about 0.7 s, 0.4 s and 0.2 s after you stop; slow feels heavy, quick feels twitchy || Most it leans | Medium | The largest angle allowed: 6°, 12° or 20°, so a fast flick cannot fold the rows over |## Production notesdiff --git a/animations/01-scroll-based/smooth-scroll/README.md b/animations/01-scroll-based/smooth-scroll/README.mdindex 3426f78d..003ac68e 100644--- a/animations/01-scroll-based/smooth-scroll/README.md+++ b/animations/01-scroll-based/smooth-scroll/README.md@@ -53,7 +53,7 @@ The share moved each frame depends on how long the frame took. A fixed lerp fact| Parameter | Default | Effect ||-----------|---------|--------|-| Glide | Medium | How much of the remaining distance the content covers in a sixtieth of a second: long is 5%, medium 9% and short 16%; a longer frame covers more, so the glide takes as long on every screen; long feels heavy and floaty, short is closer to normal scrolling |+| Glide | Medium | How much of the remaining distance the content covers in a sixtieth of a second: long is 5%, medium 9% and short 16%, so 95% of a scroll has landed after about 1 s, 0.5 s and 0.3 s; a longer frame covers more, so the glide takes as long on every screen; long feels heavy and floaty, short is closer to normal scrolling || Normal scrolling | off | Turns the glide off so the box scrolls the browser's own way, to compare the two |## Production notesdiff --git a/animations/01-scroll-based/stagger-reveal/README.md b/animations/01-scroll-based/stagger-reveal/README.mdindex 0cb2ceb0..20d43601 100644--- a/animations/01-scroll-based/stagger-reveal/README.md+++ b/animations/01-scroll-based/stagger-reveal/README.md@@ -38,7 +38,7 @@ The order array holds a *rank* per item, not a target — item `i` waits `order[## Key parameters| Parameter | Default | Effect ||-----------|---------|--------|-| Delay between items | Medium | The wait before each next item: short is 30ms, medium 50ms and long 80ms; 40 to 60ms reads as a sweep, and under 30ms the items seem to arrive together |+| Delay between items | Medium | The wait before each next item: short is 30ms, medium 50ms and long 80ms; 40 to 60ms reads as a sweep, and under 30ms the items seem to arrive together. These values suit the demo's grid of 12 small items; a few large cards need a longer wait, about 100 to 150ms, to come in visibly one after another || Order | First to last | Which item goes first: first to last, last to first, from the middle outward, or a random order each time |## Production notesdiff --git a/animations/02-entrance-and-exit/bounce-in/README.md b/animations/02-entrance-and-exit/bounce-in/README.mdindex 77f5838d..cb49b0fe 100644--- a/animations/02-entrance-and-exit/bounce-in/README.md+++ b/animations/02-entrance-and-exit/bounce-in/README.md@@ -37,7 +37,7 @@ The generated CSS is injected into a live `<style>` tag, so changing Bounce stre| Parameter | Default | Effect ||-----------|---------|--------|-| Bounce strength | Medium | How far past full size it grows: soft about 5%, medium 9% and strong 15%, with smaller dips back under |+| Bounce strength | Medium | How far past full size it grows: soft about 5%, medium 9% and strong 15%, with smaller dips back under, to about 2%, 4% and 7% below full size || Number of bounces | One | How many times it overshoots; almost always one, since more looks cartoonish || Speed | Normal | How long it takes: slow is 1800ms, normal 1100ms and fast 650ms; too short and the spring reads as a jitter || Fades in | on | Whether it fades in while it bounces or is visible from the start |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 7febbffc..f5dff067 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@@ -42,7 +42,7 @@ Adding the `.done` class flips every letter to its resting state simultaneously;|-----------|---------|--------|| Style | Cascade | Cascade animates every letter in turn; Typewriter types them out || Delay between letters | Medium | The gap between letters: short is 20ms, medium 35ms and long 80ms; higher is slower and more theatrical |-| How each letter appears | Fade up | In Cascade, the entrance each letter plays: fade up, fade, grow or flip |+| How each letter appears | Fade up | In Cascade, the entrance each letter plays as it fades in: fade up rises by 0.4 of the font size, fade only fades, grow starts at 30% of its size and flip turns in from 90°, edge-on, around a vertical line || Speed | Normal | In Cascade, how long each letter takes to settle: slow is 650ms, normal 400ms and fast 250ms || Blinking cursor | on | In Typewriter, a blinking cursor leads the letters || Your text | Hello, world. | The phrase that is animated, up to 60 characters |diff --git a/animations/02-entrance-and-exit/shatter-effect/README.md b/animations/02-entrance-and-exit/shatter-effect/README.mdindex e2ca38c1..2b1e486e 100644--- a/animations/02-entrance-and-exit/shatter-effect/README.md+++ b/animations/02-entrance-and-exit/shatter-effect/README.md@@ -55,7 +55,7 @@ Each piece waits until the break (`start`, the time the cracks take), then a lit|-----------|---------|--------|| Number of pieces | Medium | How finely the card breaks: few is about 15 pieces in two rings, medium about 30 in three and many 60 in four (about 46 on phones) || Breaks from | Center | Where the impact is: near the middle (moved a little at random each time) or near the top-left corner; the pieces there are the smallest and fly first |-| Gravity | Normal | None lets the pieces drift straight outward; normal throws them up a little before they fall; heavy drops them out of view |+| Gravity | Normal | None lets the pieces drift straight outward; normal throws them up a little before they fall; heavy drops them out of view. In card heights over one flight, the pieces burst out about 1.1, 0.75 and 0.55 (further near the impact, and varied at random); normal first lifts them about 0.15, then gravity pulls them to about 0.6 below where the burst alone would take them, and heavy pulls them about 2 below || Speed | Normal | How long each piece's flight takes: slow is 1700ms, normal 1100ms and fast 700ms; the cracks take about a third of that before the break || Shows the cracks | on | Draws the cracks across the card, ring by ring from the impact, before it breaks; off, it breaks at once || Tumbles in 3D | on | The pieces flip over and fly toward the viewer; off, they spin flat |diff --git a/animations/02-entrance-and-exit/split-text-reveal/README.md b/animations/02-entrance-and-exit/split-text-reveal/README.mdindex 16364ee7..efcab97e 100644--- a/animations/02-entrance-and-exit/split-text-reveal/README.md+++ b/animations/02-entrance-and-exit/split-text-reveal/README.md@@ -51,7 +51,7 @@ Per-unit animation is swappable via `data-anim` (fade-up, fade, scale, rotate);| Parameter | Default | Effect ||-----------|---------|--------|| Split into | Words | Letters give the finest cascade, words a readable rhythm, lines a block reveal |-| How each piece appears | Fade up | The small entrance each piece plays: fade up, fade, grow or flip |+| How each piece appears | Fade up | The small entrance each piece plays: fade up rises by half the font size, fade only fades, grow starts at half its size and flip turns in from 90°, edge-on, around a vertical line || Delay between pieces | Medium | The wait between pieces: short is 10ms, medium 30ms and long 100ms; small values ripple, large values feel deliberate || Speed | Normal | How long each piece takes: slow is 800ms, normal 500ms and fast 300ms || Feel | Smooth | The curve each piece uses; Springy adds a small settle, Even keeps one steady pace |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 0eec44d7..0a189b40 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@@ -41,7 +41,7 @@ The Pauses between sentences switch adds `si × 200ms` to the delay for each sen| Parameter | Default | Effect ||-----------|---------|--------|| Delay between words | Medium | The reading-speed control: short is 40ms, medium 80ms and long 150ms; below about 40ms the words blur into one reveal |-| How each word appears | Fade up | The entrance each word plays: fade up, fade, grow, blur or flip |+| How each word appears | Fade up | The entrance each word plays as it fades in: fade up rises by 0.4 of the font size, fade only fades, grow starts at 60% of its size, blur starts 8px blurred and flip turns in from 90°, edge-on, around a horizontal line || Speed | Normal | How long each word takes to settle: slow is 700ms, normal 450ms and fast 270ms || Feel | Smooth | Smooth slows each word into place; Springy adds a bounce; Even feels mechanical || Pauses between sentences | off | Adds an extra pause between sentences |diff --git a/animations/03-page-transitions/elastic-transition/README.md b/animations/03-page-transitions/elastic-transition/README.mdindex 61921d17..c7ed0c01 100644--- a/animations/03-page-transitions/elastic-transition/README.md+++ b/animations/03-page-transitions/elastic-transition/README.md@@ -50,8 +50,8 @@ A frame adds the time since the last one to `acc`, never more than 50ms, which k| Parameter | Default | Effect ||-----------|---------|--------|| How it bounces | Planned path | A planned path plays a bounce decided in advance, which is cheap; a live spring works out the movement in small fixed time steps, which feels physical and can react to interruptions |-| Bounce size | Medium | How far the page goes past its place before settling; with a live spring, a bigger bounce means less damping, so it swings for longer |-| Speed | Normal | How quickly it settles: on the planned path slow is 1400ms, normal 900ms and fast 550ms; with a live spring, a faster speed is a stiffer spring |+| Bounce size | Medium | How far the page goes past its place before settling: small is 3.6% of the page's width, medium 7.2% and large 12% on the planned path, and about as far with a live spring, where a bigger bounce means less damping, so it swings for longer |+| Speed | Normal | How quickly it settles: on the planned path slow is 1400ms, normal 900ms and fast 550ms; with a live spring, a faster speed is a stiffer spring, which settles in about 1 to 1.3 s when slow, 0.6 to 0.8 s at normal and 0.3 to 0.45 s when fast |## Production notes- **Stiffness and damping interact.** Below critical damping (`damping < 2√stiffness`) the spring oscillates; at or above it, it eases in without bounce. Tune the pair together — raising stiffness usually needs more damping to stay tasteful.diff --git a/animations/03-page-transitions/page-curl/README.md b/animations/03-page-transitions/page-curl/README.mdindex bb8c2979..d25da8b8 100644--- a/animations/03-page-transitions/page-curl/README.md+++ b/animations/03-page-transitions/page-curl/README.md@@ -31,7 +31,7 @@ The flap is a box the color of the back of the sheet. Its shading is a `linear-g|-----------|---------|--------|| Turn speed | Normal | How long one page takes to turn over: slow is 1500ms, normal 1000ms and fast 650ms || Which way it turns | Forward and back | Forward and back turns the page away for a later page and lays an earlier page back down; the other two always turn one way |-| Paper shading | Soft | How strongly the fold is shaded and how dark the shadow on the page below is; off leaves a flat paper back |+| Paper shading | Soft | How strongly the fold is shaded and how dark the shadow on the page below is: soft darkens the shadow to 42% black at mid-turn and the turned-over paper to 30% black along the fold, strong to 70% and 50%; off leaves a flat paper back |## Production notes- **A straight fold is a good fake.** Real paper bends in a curve, which needs a mesh in WebGL or many thin strips. A straight fold with a gradient across the flap reads as a curl at a fraction of the cost.diff --git a/animations/03-page-transitions/view-transitions-api/README.md b/animations/03-page-transitions/view-transitions-api/README.mdindex f9aedfc4..86ed2f79 100644--- a/animations/03-page-transitions/view-transitions-api/README.md+++ b/animations/03-page-transitions/view-transitions-api/README.md@@ -45,7 +45,7 @@ Switching the `data-vt` attribute swaps in a different keyframe set (slide, zoom## Key parameters| Parameter | Default | Effect ||-----------|---------|--------|-| Transition style | Fade | Fade blends the two pictures; Slide pushes the old one out to the left as the new one comes in from the right; Zoom shrinks the old one away as the new one settles from slightly larger; Tilt turns both slightly as they fade |+| Transition style | Fade | Fade blends the two pictures; Slide pushes the old one out to the left as the new one comes in from the right, each moving a full width; Zoom shrinks the old one away to 80% as it fades while the new one fades in and settles from slightly larger, 115%; Tilt turns both slightly as they fade: the old one shrinks to 90% and turns 2° counterclockwise, and the new one starts at 90%, turned 2° clockwise || Speed | Normal | How long the change takes: slow is 800ms, normal 500ms and fast 300ms; under about 150ms it reads as an instant swap || Feel | Gentle | Gentle eases in and out; Smooth slows to a stop; Even keeps one steady pace |diff --git a/animations/03-page-transitions/zoom-transition/README.md b/animations/03-page-transitions/zoom-transition/README.mdindex 87e5858b..c52971d6 100644--- a/animations/03-page-transitions/zoom-transition/README.md+++ b/animations/03-page-transitions/zoom-transition/README.md@@ -35,7 +35,7 @@ Because the incoming and outgoing scales differ per variant, the same code path## Key parameters| Parameter | Default | Effect ||-----------|---------|--------|-| Zoom style | Zoom in | Zoom in grows the new page from 75% as the old one shrinks to 90%; Zoom out grows the old page past the frame as it fades; Pull through shrinks the old page to 70% while the new one settles from 130% |+| Zoom style | Zoom in | Zoom in grows the new page from 75% as the old one shrinks to 90%; Zoom out grows the old page past the frame, to 120%, as it fades, while the new one fades in at full size; Pull through shrinks the old page to 70% while the new one settles from 130% || Speed | Normal | How long the zoom and the fade take: slow is 900ms, normal 550ms and fast 330ms || Feel | Smooth | Smooth slows to a stop; Springy grows a little past full size and settles; Gentle eases in and out |