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: See inside and Compare in the README's How to use and in CLAUDE.md's page template
matin9ef73e99023d
diff --git a/CLAUDE.md b/CLAUDE.mdindex 771f183a..7ba9a3a6 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -76,6 +76,18 @@ The page owns the stage's width, border, corners and height (`--hb-stage-h` andanother one); the demo owns overflow, background, alignment and perspective. `hb-dots` adds a dottedbackground to a plain dark stage; `hb-grow` lets a stage with visitor-editable text grow taller.+**Mode switch** (optional, on some pages). In the Watch step, between the heading and the stage, `div.seg.hb-modes[data-hb-modes]`+holds three buttons with `data-hb-mode`: `normal` (pressed at first), `inside` (See inside) and `compare`. After the player bar,+`div.hb-mode-notes[aria-live=polite]` holds exactly two hidden notes, direct children and one or two sentences each:+`p[data-hb-for="inside"]` then `p[data-hb-for="compare"]` (the Compare note names the halves by their labels). A press marks the+stage `data-hb-mode`, shows that mode's note and then sends `hb:mode` on `document` (`detail.mode`; again on a press of the mode+already pressed, never at boot). The demo listens at the top level of its script, draws the mode at once and never scrolls, moves+focus, presses a control, stops Play or changes Pause; every mode rule names `.stage[data-hb-mode="inside"]` or `"compare"` (Normal+has none) and labels carry `data-hb-caption`. Ruling 1: after See inside or Compare the shared script presses Replay (once pages)+or Show me (do pages) one time so the view is seen working; never under reduced motion, after Normal, or on a scroll or loop page.+The mode is not a setting: it stays out of Your settings and the prompt. Copy `fade-in-out` (once), `magnetic-button` (do),+`parallax-scrolling` (scroll) or `marquee-ticker` (loop).+#### Page kinds and their controlsThe body declares one kind: `<body class="hb" data-hb-kind="once|loop|do|scroll">`. Every kind except loop alsohas `data-hb-autoplay` on the body, which runs the arrival. Player markers sit in the player bar, at most onediff --git a/README.md b/README.mdindex 9652b8a8..1933d70f 100644--- a/README.md+++ b/README.md@@ -29,7 +29,7 @@ Everything is plain HTML, CSS, and JavaScript: no build step, no frameworks, no## How to use it1. **Find it.** On the [home page](https://matinmonshizadeh.github.io/animation-handbook/), pick where the animation goes — Buttons, Text, Images & cards, Backgrounds, Menus & forms, Loading & messages, Page intros, Scrolling, or Page changes — or describe it in your own words, like "a button that bounces when clicked", or, if you saw it somewhere and don't know its name, answer three questions in the [finder](https://matinmonshizadeh.github.io/animation-handbook/?view=find).-2. **Watch it and try it.** Each page plays the animation, and most offer a few plain settings, such as speed or direction, so you see exactly what you will get.+2. **Watch it and try it.** Each page plays the animation, and most offer a few plain settings, such as speed or direction, so you see exactly what you will get. Some pages also have a See inside view, which shows the parts that make the effect (guides, hidden layers, the numbers made visible), and a Compare view, which shows the effect beside a version without its key idea; switch between them above the stage.3. **Copy the prompt.** Paste it into your AI assistant. It describes the animation in plain words, with your settings. The cards on the home page have a Copy prompt button too.**Seen it on a famous site?** [Famous effects](https://matinmonshizadeh.github.io/animation-handbook/famous/) shows effects people admire on well-known websites, the handbook animations that make something similar, and a prompt to build your own.