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
fix: Magnetic Button (04.05) and Spotlight Hover Glow (04.31): the keyboard comments use American spelling
matin5aa050a7812c
diff --git a/animations/04-micro-interactions/magnetic-button/index.html b/animations/04-micro-interactions/magnetic-button/index.htmlindex 89dbcfbf..961275e3 100644--- a/animations/04-micro-interactions/magnetic-button/index.html+++ b/animations/04-micro-interactions/magnetic-button/index.html@@ -191,7 +191,7 @@btn.addEventListener('pointerdown',()=>btn.classList.add('pressed'));['pointerup','pointercancel','pointerleave'].forEach(type=>btn.addEventListener(type,()=>btn.classList.remove('pressed')));- // The keyboard: with the button focused, the arrow keys move a pretend pointer from its resting centre (kx,ky, in Reach: a+ // The keyboard: with the button focused, the arrow keys move a pretend pointer from its resting center (kx,ky, in Reach: a// tenth of it a press, a held key repeating, up to 1.2, which is out of reach) through the same pull() as the mouse, so the// button leans toward it and springs home once it is out of reach. Escape sends the button home, as the mouse leaving does,// and so does the focus leaving after the keys pulled it; Space and Enter press it, as a pointer does. Focus arriving stops adiff --git a/animations/04-micro-interactions/spotlight-hover/index.html b/animations/04-micro-interactions/spotlight-hover/index.htmlindex 58830721..8b59f332 100644--- a/animations/04-micro-interactions/spotlight-hover/index.html+++ b/animations/04-micro-interactions/spotlight-hover/index.html@@ -26,7 +26,7 @@.stage{display:flex;overflow:hidden;background:#09090b;padding:clamp(12px,2.4vw,24px)}/* touch-action none: a finger dragged over the cards moves the light instead of scrolling the page */.grid{position:relative;flex:1;min-width:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:clamp(8px,1.4vw,14px);touch-action:none;-webkit-user-select:none;user-select:none}- /* The grid takes keyboard focus (the arrow keys move the light): its ring goes round it, in the stage's padding, not over the cards */+ /* The grid takes keyboard focus (the arrow keys move the light): its ring goes around it, in the stage's padding, not over the cards */.hb-page .stage .grid:focus-visible{outline-offset:4px;border-radius:18px}/* A card is a faint frame (its padding is the edge) around an opaque face */.sc{position:relative;overflow:hidden;border-radius:14px;padding:var(--bw);background:rgba(255,255,255,.09)}