Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

fix: the skill's rules after an adversarial review: reduced motion follows each prompt's own version, physics keeps its fixed time steps, an accordion may animate its height, scrubbed effects start from their first frame, a card that holds a link shows its hover on keyboard focus, a tap pauses moving text, small CSS loops need no watching, and an effect the browser cannot run shows a still version

matin3209587c82cb
diff --git a/skills/animation-handbook/SKILL.md b/skills/animation-handbook/SKILL.md
index 5fe7fa02..42a335ac 100644
--- a/skills/animation-handbook/SKILL.md
+++ b/skills/animation-handbook/SKILL.md
@@ -6,33 +6,33 @@ license: MIT
# Animation Handbook
-[Animation Handbook](https://matinmonshizadeh.github.io/animation-handbook/) is a free reference of 166 web animation techniques. Each one has a page where it plays live, a few plain settings for most of them (speed, direction, color and the like) and a prompt that says in plain words how to build it. This skill holds every prompt and every setting with the demo's values, so you can pick the right technique and build it into the user's own project.
+[Animation Handbook](https://matinmonshizadeh.github.io/animation-handbook/) is a free reference of 166 web animation techniques. Each has a live demo, a few plain settings for most (speed, direction, color and the like) and a prompt that says in plain words how to build it. This skill holds every prompt and every setting with the demo's values.
## How to use it
-1. **Find the technique.** Search [references/catalog.md](references/catalog.md) for the effect the user describes and a synonym or two, rather than reading the whole file. Each line holds one technique: its name and live demo address, what it does and what it is best for, and its places, the parts of a page it suits (Buttons, Text, Images & cards, Backgrounds, Menus & forms, Loading & messages, Page intros, Scrolling, Page changes). Match both what the user describes and where it goes. Read the whole catalog, or its By place index at the end, only when the user wants ideas or a search finds nothing that fits. When two fit equally well, build one and mention the other; when none fits, say so and build what the user asked for with the rules below.
-2. **Read its entry.** It is in the category file named after the folder in its address (references/04-micro-interactions.md for an address under animations/04-micro-interactions/), from the heading with the technique's name to the next heading: what it is good for and what to avoid it on, how it runs, its prompt and its settings. If the user's place is on its Avoid on list, say so and suggest a better fit.
+1. **Find the technique.** Search [references/catalog.md](references/catalog.md) for the effect the user describes and a synonym or two; read the whole file only when you cannot search, the user wants ideas or nothing fits (its By place index is at the end). Each line ends with its places, the parts of a page it suits (Buttons, Text, Images & cards, Backgrounds, Menus & forms, Loading & messages, Page intros, Scrolling, Page changes): match both what the user describes and where it goes. When two fit equally well, build one and mention the other; when none fits, say so and build what the user asked for with the rules below.
+2. **Read its entry.** It is in the category file named after the folder in its address (references/04-micro-interactions.md for an address under animations/04-micro-interactions/), from the heading with the technique's name to the next heading. If the user's place is on its Avoid on list, prefer a better fit; if they asked for this one by name, build it and say what may suit better.
3. **Choose the settings.** Each setting lists its choices and what they do, with the demo's values. The choice in bold is where the demo starts, set to show the effect off in a small box: a starting point, not advice for every page. Take what the user asked for first ("a panel that slides in slowly from the left" picks the slow speed and the left side), then choose the rest for their page: its size, how many things move and what the effect is for. A speed that suits a small demo can feel rushed across a full-width hero, and a delay that reads well between many small tiles can vanish between a few large cards. Ask only when a choice changes the result a lot and nothing points either way.
-4. **Build the smallest version that does what the user asked**, in their own stack (plain HTML, CSS and JavaScript, React, Vue, Svelte or whatever the project uses), with their element in place of each [part in square brackets]. The prompt describes the whole technique as its demo shows it. Keep everything it says about looking right, staying smooth, accessibility and reduced motion, but build only the features the request needs: one confirmation message does not need a stack of them, and a hover effect does not need a touch-drag version when touch users miss nothing without it. "Match the settings listed below" means your choices from step 3.
-5. **Check it** against the rules below. Then tell the user which technique you built, with its live demo address; the settings you chose, and why where they differ from the demo's; and the features of the prompt you left out, as options they can ask for.
+4. **Build what the user asked, no more and no less**, in their own stack, with their element in place of each [part in square brackets]. The prompt describes the whole technique as its demo shows it. Keep what it says about how each part looks, moves and behaves, accessibility and reduced motion included, but build only the parts the request needs: one confirmation message does not need a stack of them. "Match the settings listed below" means your choices from step 3.
+5. **Check it** against the rules below. Then tell the user, in a few lines, which technique you built, with its live demo address; the settings you chose, and why where they differ from the demo's; and the parts of the prompt you left out, which they can ask for.
-When the user only asks which animation to use, suggest one or two from the catalog with their live demo addresses, and build once they choose. To improve an animation the project already has, find its closest technique the same way and change only what falls short of that prompt and the rules below.
+When the user only asks which animation to use, suggest one or two for each place they ask about, with their live demo addresses, and build once they choose. To improve an animation the project already has, find its closest technique the same way and change only what falls short of that prompt and the rules below, adding no part they did not ask for.
## The rules for the user's page
-Keep these even where a prompt does not say them. Each prompt describes its technique as the demo shows it, in a box on a page about animation; where a prompt and a rule differ, follow the rule, which is about real pages.
+Keep these even where a prompt does not say them, and follow them where a prompt differs: each prompt describes its technique as its demo shows it, in a box on a page about animation.
-- **Keep the page whole without the animation.** Nothing on screen when the page loads waits for a scroll to appear: it shows at once or plays its entrance right away, and only what starts below the first screen waits for the scroll. Hide content for an entrance only from the script that will reveal it, and create controls that work only with a script, such as an accordion's buttons, from that script, so the page still shows everything if the script fails.
-- **Give keyboard users what mouse users get on what they can reach.** On a link, button or form control, an effect that shows on hover also shows on focus, and one that starts on a press also starts on Enter or Space, from the middle of the control. Do not make other content focusable for a decorative effect, and leave the arrow keys alone unless the element is a control that uses them, such as a slider or a carousel: extra tab stops and captured keys cost keyboard users more than the effect gives them.
-- **Give touch what it needs.** When a hover reveals something people need, such as a menu, a tooltip or a hidden button, a tap reveals it too, and a drag uses pointer events so that touch works. A purely decorative hover effect, such as a tilt or a glow, can stay still on touch screens.
-- **Follow reduced motion.** When the device asks for reduced motion, show the end state or a short fade instead of the movement, and start loops paused.
-- **Move with transform and fade with opacity.** Never animate width, height, top, left or box-shadow, which make the browser lay out or repaint the page on every frame. Where the effect is something else, such as a clip, a line that draws itself, a color change or a blur-in, the prompt says how to keep it smooth.
-- **Make soft shapes from gradients.** A glow or a blob of color that only needs soft edges gets them from a gradient that fades to transparent, not from a large blur filter, which costs the browser a lot on every frame while the shape moves; a gradient is drawn once and then only moved. Keep the blur where it is the effect, as in a blur-in, frosted glass or a gooey merge.
-- **Stop what nobody can see.** A loop that keeps running, such as an ambient background, a canvas or a frame loop, pauses while it is scrolled out of view; a frame loop or timer also stops while the tab is hidden.
-- **Time a frame loop by the clock.** Each frame moves by the time since the last one, capped at about 50 ms, never by a fixed step, so it runs at the same speed on 30, 60 and 120 Hz screens.
+- **Keep the page whole without the animation.** No entrance on the first screen waits for a scroll: it plays as the page loads, and only what starts below the first screen waits to scroll into view. An effect that moves only as far as the visitor scrolls, such as a scrub, simply starts from its first frame. Hide content for an entrance only from a script, early enough that nothing flickers, and create controls that work only with a script, such as an accordion's buttons, from that script, so the page still shows everything if the script fails. Where the browser cannot run an effect, such as one that needs WebGL, show a still version in its place rather than an error.
+- **Give keyboard users what mouse users get on what they can reach.** On a link, button or form control, or a card that holds one, an effect that shows on hover also shows on keyboard focus, and one that starts on a press also starts when the keyboard presses it, from the middle of the control. Do not make other content focusable for a decorative effect, and leave the arrow keys alone unless the element is a control that uses them, such as a slider, a carousel or a list you reorder: extra tab stops and captured keys cost keyboard users more than the effect gives them.
+- **Give touch what it needs.** When a hover reveals or does something people need, such as a menu, a tooltip, a hidden button or a pause to read moving text, a tap does it too, and a drag uses pointer events so that touch works. A purely decorative hover effect, such as a tilt or a glow, can stay still on touch screens.
+- **Follow reduced motion as the prompt says**: its version keeps what the technique needs. Where nothing says, show the end state or a short fade instead of the movement, and start loops paused.
+- **Move with transform and fade with opacity.** Never animate width, height, top, left or box-shadow, which make the browser lay out or repaint the page on every frame; only a box that pushes the content below as it opens or closes, such as an accordion's answer, may animate its height. Where the effect is something else, such as a clip, a line that draws itself, a color change or a blur-in, the prompt says how to keep it smooth.
+- **Make soft shapes from gradients.** A glow or a blob of color that only needs soft edges gets them from a gradient that fades to transparent, not from a large blur filter, which costs the browser a lot on every frame while the shape moves; a gradient is drawn once and then only moved. Keep the blur where it is the effect, as in a blur-in, depth of field, frosted glass, a gooey merge or the glow of a moving border.
+- **Stop what nobody can see.** A loop that keeps running, such as an ambient background, a canvas or a frame loop, pauses while it is scrolled out of view; a frame loop or timer also stops while the tab is hidden. A small CSS loop, such as a spinner, needs neither.
+- **Time a frame loop by the clock.** Each frame moves by the time since the last one, capped at about 50 ms, never by a fixed amount per frame, so it runs at the same speed on 30, 60 and 120 Hz screens.
- **Lighten heavy effects on phones**, up to 600 px wide or 500 px tall when held sideways: less blur, fewer particles, a simpler shader.
-- **Keep touch targets at least 44×44 px on phones**, buttons and handles drawn inside the animation included, and **text at least 4.5:1 against its background.**
-- **Add no library the project does not already use.** Every prompt works with plain code; use GSAP, Framer Motion, Three.js or the like only where the project has it.
+- **Keep touch targets at least 44×44 px on phones**, buttons and handles drawn inside the animation included, and **text meant to be read at least 4.5:1 against its background.**
+- **Add no library the project does not already use.** Every prompt works with plain code; use GSAP, Framer Motion, Three.js or the like only where the project has it or the user asks for it.
## Where to look
@@ -45,4 +45,4 @@ Keep these even where a prompt does not say them. Each prompt describes its tech
- [references/06-3d-advanced.md](references/06-3d-advanced.md): 3D & Advanced, 26 animations. WebGL, shaders, particles, 3D transforms, simulations, and other heavier effects.
- [references/07-ambient-background.md](references/07-ambient-background.md): Ambient & Background, 23 animations. Passive, looping effects that hold visual interest without demanding attention — gradients, particles, grain, and glows.
-Each live demo address is also the technique's folder in the repository, https://github.com/matinmonshizadeh/animation-handbook: the page holds the demo's code, and its README (the address followed by README.md) explains how it works, with production notes. The entries hold what you need to build a technique; read a README only when the user asks how one works.
+Each live demo address is also the technique's folder in https://github.com/matinmonshizadeh/animation-handbook; read its README (the address followed by README.md) only when the user asks how a technique works.
diff --git a/tools/make-skill.mjs b/tools/make-skill.mjs
index 001f7e24..75c7a66a 100644
--- a/tools/make-skill.mjs
+++ b/tools/make-skill.mjs
@@ -303,40 +303,40 @@ function entry(page) {
const SKILL_BODY = ({ total, base, cats }) => `# Animation Handbook
-[Animation Handbook](${base}) is a free reference of ${total} web animation techniques. Each one has a page where it plays live, a few plain settings for most of them (speed, direction, color and the like) and a prompt that says in plain words how to build it. This skill holds every prompt and every setting with the demo's values, so you can pick the right technique and build it into the user's own project.
+[Animation Handbook](${base}) is a free reference of ${total} web animation techniques. Each has a live demo, a few plain settings for most (speed, direction, color and the like) and a prompt that says in plain words how to build it. This skill holds every prompt and every setting with the demo's values.
## How to use it
-1. **Find the technique.** Search [references/catalog.md](references/catalog.md) for the effect the user describes and a synonym or two, rather than reading the whole file. Each line holds one technique: its name and live demo address, what it does and what it is best for, and its places, the parts of a page it suits (${cats.places}). Match both what the user describes and where it goes. Read the whole catalog, or its By place index at the end, only when the user wants ideas or a search finds nothing that fits. When two fit equally well, build one and mention the other; when none fits, say so and build what the user asked for with the rules below.
-2. **Read its entry.** It is in the category file named after the folder in its address (references/04-micro-interactions.md for an address under animations/04-micro-interactions/), from the heading with the technique's name to the next heading: what it is good for and what to avoid it on, how it runs, its prompt and its settings. If the user's place is on its Avoid on list, say so and suggest a better fit.
+1. **Find the technique.** Search [references/catalog.md](references/catalog.md) for the effect the user describes and a synonym or two; read the whole file only when you cannot search, the user wants ideas or nothing fits (its By place index is at the end). Each line ends with its places, the parts of a page it suits (${cats.places}): match both what the user describes and where it goes. When two fit equally well, build one and mention the other; when none fits, say so and build what the user asked for with the rules below.
+2. **Read its entry.** It is in the category file named after the folder in its address (references/04-micro-interactions.md for an address under animations/04-micro-interactions/), from the heading with the technique's name to the next heading. If the user's place is on its Avoid on list, prefer a better fit; if they asked for this one by name, build it and say what may suit better.
3. **Choose the settings.** Each setting lists its choices and what they do, with the demo's values. The choice in bold is where the demo starts, set to show the effect off in a small box: a starting point, not advice for every page. Take what the user asked for first ("a panel that slides in slowly from the left" picks the slow speed and the left side), then choose the rest for their page: its size, how many things move and what the effect is for. A speed that suits a small demo can feel rushed across a full-width hero, and a delay that reads well between many small tiles can vanish between a few large cards. Ask only when a choice changes the result a lot and nothing points either way.
-4. **Build the smallest version that does what the user asked**, in their own stack (plain HTML, CSS and JavaScript, React, Vue, Svelte or whatever the project uses), with their element in place of each [part in square brackets]. The prompt describes the whole technique as its demo shows it. Keep everything it says about looking right, staying smooth, accessibility and reduced motion, but build only the features the request needs: one confirmation message does not need a stack of them, and a hover effect does not need a touch-drag version when touch users miss nothing without it. "Match the settings listed below" means your choices from step 3.
-5. **Check it** against the rules below. Then tell the user which technique you built, with its live demo address; the settings you chose, and why where they differ from the demo's; and the features of the prompt you left out, as options they can ask for.
+4. **Build what the user asked, no more and no less**, in their own stack, with their element in place of each [part in square brackets]. The prompt describes the whole technique as its demo shows it. Keep what it says about how each part looks, moves and behaves, accessibility and reduced motion included, but build only the parts the request needs: one confirmation message does not need a stack of them. "Match the settings listed below" means your choices from step 3.
+5. **Check it** against the rules below. Then tell the user, in a few lines, which technique you built, with its live demo address; the settings you chose, and why where they differ from the demo's; and the parts of the prompt you left out, which they can ask for.
-When the user only asks which animation to use, suggest one or two from the catalog with their live demo addresses, and build once they choose. To improve an animation the project already has, find its closest technique the same way and change only what falls short of that prompt and the rules below.
+When the user only asks which animation to use, suggest one or two for each place they ask about, with their live demo addresses, and build once they choose. To improve an animation the project already has, find its closest technique the same way and change only what falls short of that prompt and the rules below, adding no part they did not ask for.
## The rules for the user's page
-Keep these even where a prompt does not say them. Each prompt describes its technique as the demo shows it, in a box on a page about animation; where a prompt and a rule differ, follow the rule, which is about real pages.
+Keep these even where a prompt does not say them, and follow them where a prompt differs: each prompt describes its technique as its demo shows it, in a box on a page about animation.
-- **Keep the page whole without the animation.** Nothing on screen when the page loads waits for a scroll to appear: it shows at once or plays its entrance right away, and only what starts below the first screen waits for the scroll. Hide content for an entrance only from the script that will reveal it, and create controls that work only with a script, such as an accordion's buttons, from that script, so the page still shows everything if the script fails.
-- **Give keyboard users what mouse users get on what they can reach.** On a link, button or form control, an effect that shows on hover also shows on focus, and one that starts on a press also starts on Enter or Space, from the middle of the control. Do not make other content focusable for a decorative effect, and leave the arrow keys alone unless the element is a control that uses them, such as a slider or a carousel: extra tab stops and captured keys cost keyboard users more than the effect gives them.
-- **Give touch what it needs.** When a hover reveals something people need, such as a menu, a tooltip or a hidden button, a tap reveals it too, and a drag uses pointer events so that touch works. A purely decorative hover effect, such as a tilt or a glow, can stay still on touch screens.
-- **Follow reduced motion.** When the device asks for reduced motion, show the end state or a short fade instead of the movement, and start loops paused.
-- **Move with transform and fade with opacity.** Never animate width, height, top, left or box-shadow, which make the browser lay out or repaint the page on every frame. Where the effect is something else, such as a clip, a line that draws itself, a color change or a blur-in, the prompt says how to keep it smooth.
-- **Make soft shapes from gradients.** A glow or a blob of color that only needs soft edges gets them from a gradient that fades to transparent, not from a large blur filter, which costs the browser a lot on every frame while the shape moves; a gradient is drawn once and then only moved. Keep the blur where it is the effect, as in a blur-in, frosted glass or a gooey merge.
-- **Stop what nobody can see.** A loop that keeps running, such as an ambient background, a canvas or a frame loop, pauses while it is scrolled out of view; a frame loop or timer also stops while the tab is hidden.
-- **Time a frame loop by the clock.** Each frame moves by the time since the last one, capped at about 50 ms, never by a fixed step, so it runs at the same speed on 30, 60 and 120 Hz screens.
+- **Keep the page whole without the animation.** No entrance on the first screen waits for a scroll: it plays as the page loads, and only what starts below the first screen waits to scroll into view. An effect that moves only as far as the visitor scrolls, such as a scrub, simply starts from its first frame. Hide content for an entrance only from a script, early enough that nothing flickers, and create controls that work only with a script, such as an accordion's buttons, from that script, so the page still shows everything if the script fails. Where the browser cannot run an effect, such as one that needs WebGL, show a still version in its place rather than an error.
+- **Give keyboard users what mouse users get on what they can reach.** On a link, button or form control, or a card that holds one, an effect that shows on hover also shows on keyboard focus, and one that starts on a press also starts when the keyboard presses it, from the middle of the control. Do not make other content focusable for a decorative effect, and leave the arrow keys alone unless the element is a control that uses them, such as a slider, a carousel or a list you reorder: extra tab stops and captured keys cost keyboard users more than the effect gives them.
+- **Give touch what it needs.** When a hover reveals or does something people need, such as a menu, a tooltip, a hidden button or a pause to read moving text, a tap does it too, and a drag uses pointer events so that touch works. A purely decorative hover effect, such as a tilt or a glow, can stay still on touch screens.
+- **Follow reduced motion as the prompt says**: its version keeps what the technique needs. Where nothing says, show the end state or a short fade instead of the movement, and start loops paused.
+- **Move with transform and fade with opacity.** Never animate width, height, top, left or box-shadow, which make the browser lay out or repaint the page on every frame; only a box that pushes the content below as it opens or closes, such as an accordion's answer, may animate its height. Where the effect is something else, such as a clip, a line that draws itself, a color change or a blur-in, the prompt says how to keep it smooth.
+- **Make soft shapes from gradients.** A glow or a blob of color that only needs soft edges gets them from a gradient that fades to transparent, not from a large blur filter, which costs the browser a lot on every frame while the shape moves; a gradient is drawn once and then only moved. Keep the blur where it is the effect, as in a blur-in, depth of field, frosted glass, a gooey merge or the glow of a moving border.
+- **Stop what nobody can see.** A loop that keeps running, such as an ambient background, a canvas or a frame loop, pauses while it is scrolled out of view; a frame loop or timer also stops while the tab is hidden. A small CSS loop, such as a spinner, needs neither.
+- **Time a frame loop by the clock.** Each frame moves by the time since the last one, capped at about 50 ms, never by a fixed amount per frame, so it runs at the same speed on 30, 60 and 120 Hz screens.
- **Lighten heavy effects on phones**, up to 600 px wide or 500 px tall when held sideways: less blur, fewer particles, a simpler shader.
-- **Keep touch targets at least 44×44 px on phones**, buttons and handles drawn inside the animation included, and **text at least 4.5:1 against its background.**
-- **Add no library the project does not already use.** Every prompt works with plain code; use GSAP, Framer Motion, Three.js or the like only where the project has it.
+- **Keep touch targets at least 44×44 px on phones**, buttons and handles drawn inside the animation included, and **text meant to be read at least 4.5:1 against its background.**
+- **Add no library the project does not already use.** Every prompt works with plain code; use GSAP, Framer Motion, Three.js or the like only where the project has it or the user asks for it.
## Where to look
- [references/catalog.md](references/catalog.md): all ${total} in one list, grouped by category, with an index by place.
${cats.lines}
-Each live demo address is also the technique's folder in the repository, ${REPO}: the page holds the demo's code, and its README (the address followed by README.md) explains how it works, with production notes. The entries hold what you need to build a technique; read a README only when the user asks how one works.
+Each live demo address is also the technique's folder in ${REPO}; read its README (the address followed by README.md) only when the user asks how a technique works.
`;
export function buildSkill(root) {