Verification
Automated suite: motion/ in animaxxing-skills-test type-checks every recipe straight from this skill and runs its checks in Chromium (pnpm test:motion). Run it after changing any recipe. Keep usage snippets under a ## Wiring heading or starting with // Example so the suite skips them, and head each separate module's section with its file name, such as ## field.ts.
Reference demo: Animaxxing exercises the recipes with style-animaxxing, which is not a required design. Check visual quality there or in the consuming app, alongside the framework skill's checks.
Portability
- An effect-only request keeps the app's fonts, palette, layout, and component styling; copying a recipe needs no style tokens or fonts.
- Particle color follows the canvas's computed
color, including theme changes, with enough contrast on the actual background. - Weight effects run on a loaded variable face within its axis, at the target's resting weight. A static face gets transform-only effects.
- Timing, spread, intensity, and stagger suit the actual surface and viewport. Layout boxes stay stable.
- Line breaks never move while text animates. Check by pausing GSAP, switching off every transform (transforms never change layout), and recording which line each word starts on, throughout the entrance and at rest. Three causes to look for:
- A face that loads after the text is laid out: wait for the faces before the first measure or split, and keep the text hidden until then, briefly at most.
- Text split into lines that wraps differently from the resting text: words set as separate boxes can break a line one word early. Prefer one effect over the whole block, or check the split's breaks against the rest's.
- Letter-spacing, width, or weight tweened on text that wraps, or on a copy without
white-space: nowrap.
- A reveal triggered by a section fires when that section's top crosses the line. Trigger on the element itself when it sits well below its section's top, or it plays before it can be seen.
- In a data-driven app, run the framework's data-readiness checks: no guest or empty content flashes before the effect, and reserved regions keep siblings still.
Motion
- Entrance splits revert at settled; only an active wave or speak-in finishes keep markup, until their cleanup boundary.
- Kill a parent timeline of split runners mid-way:
revertTextrestores each target, and a new runner starts from clean markup. - A setup that throws leaves GSAP's global context untouched: later tweens are not recorded by the failed context.
- Covers and wipes reach their positions: trace the computed transform at the covered moment and at rest, not just the tween values. A start parked in CSS shows up as a constant extra offset.
- Typewriter: the element keeps its size while typing, the overlay grows one character at a time in order,
typeOutdeletes from the end and ends hidden, the caret blinks under three times a second and goes, andrevertTypingrestores the markup when killed.retypereads every word once from a hidden twin, stops on the last word, andrevertputs the first back. - Implode starts every character out along its line from the center and lands it exactly; explode sends each the same way and ends hidden, with the heading restored.
- Scramble runners visibly scramble, end on the real words, and restore them when killed. Every noise character matches its source's kind: capitals for capitals, lowercase for lowercase, digits for digits; punctuation is blank or itself, never noise.
- Glitch runners jump each type visibly, end on the exact markup and
positionandtransform, keep the original text readable while copies show, strip ids from copies, and restore throughrevertTextwhen killed. Copies show and hide at most once each. - Highlight runners leave no bar behind at settled or when killed, and bars span each line's words, not the full line box, in LTR and RTL.
- Ellipse runners show whole lines at settled, with descenders and accents unclipped at both endpoints.
- No inline
transform,will-change, ortransitionremains on route items at settled. - If the controller uses
data-transition-state, it reportsentering → idleandexiting → waiting, never completion while a timeline runs. - Particle canvases: one per treated element, at
-bleed,pointer-events: none,aria-hidden, colored from the canvascolor. The ticker drops a field once its particles are gone and no emitter is attached. - Mouse hover and keyboard focus share a hot state; leaving one input preserves the other.
- Touch buttons and text fields flare while pressed and cool on release or swipe cancel. Tap-derived focus stays cold.
- Keyboard input after touch restores focus treatment; held keys do not repeat bursts.
- Coarse input thins transient particles but keeps outlines, owned particles, and runner counts.
- At phone width with 4x CPU throttling, lower budgets if idle frame pacing fails.
- Reduced motion (
prefers-reduced-motion: reduceordata-motion="reduced"): entrances land settled at once, exits reach their end state, nothing splits, spawns, or waves, and every completion callback fires. - A treated element scrolled off screen stops its field ticking.
blast()orexit()during a particle entrance leaves no particle alive after a second and stops the ticker; a followingidle()shows the target whole, unscaled, and unclipped.- After
destroy(), the field stays stopped even for delayed callbacks, and the target's inline styles match their pre-attach state. - A throwing particle factory or observer attachment rolls back target styles, canvas attributes, tweens, and listeners. A throwing treatment cleanup cannot skip the remaining restores; later controls and queued resizes stay inert.
blastOff.revert()preserves authored transforms, filters, and CSS priorities after interruption, full completion, and reduced motion, including repeated teardown.- The wave, particle controls, and follower hold on
pause()and continue onplay()orresume(), wired to a page control or motion setting.
Scroll
- Reload mid-page and restore via back: reveal targets above the fold are visible, never stuck hidden.
- Reveal targets waiting below the fold stay in the accessibility tree and tab order; tabbing into one shows it at once.
- Scroll down and back through every scrubbed effect; each returns exactly to its start values.
- Pinned scenes and runs: no jump entering or leaving the pin; content below lands in place.
revealOnScrollwithrepeat: scrolling back above the start hides an item, and scrolling down reveals it again; withoutrepeatit stays revealed.stackCards: each card pinsoffsetpx below the last, buried cards shrink byshrinkper card above, the deck leaves together with its spacing, and teardown leaves no pin spacer or inline style.zoomThrough: inscalemode the focus point holds still while the target grows, the target ends hidden and the back at scale 1; inclipmode the window opens toinset(0); teardown restores every child's style.scrollWaypoints: the traveller rests in place at the top, covers each marker's box exactly when that marker is centered, and lands again after a resize or a moved marker plus refresh; revert leaves no trigger or inline transform.runDriftitems travel from-traveltoward+travelacross the run and never show past their frames;morphScrubreturns to the authored shape scrolling back up, and to the authoreddafter revert.- A
driftcurtain leaves no transform on the content wrapper afterreveal()orrevert; fixed UI stays in the shell. - Resize across a breakpoint and refresh: pin lengths and run distance recompute; nothing overlaps.
- Tab through a horizontal run: each focused item scrolls into view without the section scrolling itself. A mouse click on an item does not scroll the page.
- Tearing down a pinned scene restores only what its tweens animated; other effects' inline values survive.
- Tear down mid-pin: the spacer is removed, inline styles and
overflowrestore, and page scroll works. - A pop-in reveal starts at its given scale and rotation and clears every inline transform once revealed.
- A footer parallax with
end: "bottom bottom"completes its travel at the bottom of the page. navTheme: the header'sdata-nav-themematches the section under its middle, scrolling both ways and on a mid-page load; teardown restores the header's own attribute.scrollDirection: small reversals under the threshold keep the direction;data-scroll-startedturns false back at the top; a focused header stays visible in CSS.- Reduced motion: no pins, splits, or scrubbing; static fallbacks read; the progress rule, nav theme, and scroll direction still track.
- With a custom scroller, every trigger receives it and cleanup leaves the app's proxy intact.
Pointer
- Magnetic, tilt, and follower respond to the mouse, ignore touch and pen, and never stick after a tap.
- Spotlight: the circle grows under the mouse, follows it, and shrinks on leave; a held touch opens it under the finger and a lift or cancel closes it; focus inside opens the whole layer; reduced motion places it on the pointer without easing; teardown restores the layer's
clip-path. - Leaving the target returns it exactly to rest; teardown leaves no inline transform or
--pointer-*. - The follower appears at the pointer, never sliding in from a corner, and hides when the mouse leaves the window.
- Drag a track of links: it moves and snaps without following the link; a plain click follows it.
- On touch, horizontal drags move the track and vertical swipes scroll the page.
- Keyboard focus slides the focused item into view; a mouse press does not.
- Revert during a throw: the track stops and its inline styles and the viewport's
overflowrestore. - Image trail: images spawn only after
spacingpx of mouse travel, never more thanmaxat once; each isaria-hiddenwith emptyaltand no id, and all are gone after their life and on teardown. Touch and pen spawn nothing. - Cursor label: over
[data-cursor-text]the dot hides and the label scrolls two copies of the text seamlessly; leaving hides it and pauses the loop; teardown restores the label's track and styles. - Momentum hover: a fast sweep throws and spins the struck targets, which settle to rest; hit areas never move. A still pointer entering an item does nothing.
- Proximity: the nearest item reaches the peak scale and neighbors grow less; items past
radiusstay at 1; hit areas never move; leaving the window or the radius settles everything;axisignores the other axis. - Reduced motion: no magnetic, tilt, follower, momentum hover, or proximity; the track drags and lands on the nearest item without a throw.
Endless drag
- Sortable: a drag opens the slot as the held item crosses each neighbor's middle and drops into it with every transform cleared; Space, arrows, and Escape pick up, move, and cancel with focus kept on the handle; the live region announces each step;
onReorderfires once per move; reduced motion sorts without lift or slide; revert restores the item and handle style attributes exactly and keeps the order. - Swipe to dismiss: a short drag springs back, a long drag or a quick flick dismisses, the items below slide into the gap,
onDismissfires once, vertical touch swipes still scroll, the dismiss button and Delete work, and revert restores every style attribute exactly. - Clones are
aria-hiddenandinertwith no ids; each real item is announced once and Tab visits only real items. dragLoop: a drag past either end wraps with no gap across the viewport and lands on an item; a sideways wheel moves the same position and lands; a vertical wheel scrolls the page.- Tab brings each real item into view in the loop, including after a clone set wraps and while a wheel snap or throw is pending, and centers each tile in the grid; the viewport's own scroll stays 0.
- A drag or throw over a link never follows it; a plain click does.
- Drift holds on hover, focus inside, drag, off screen, and
pause(), and resumes after each; a visible control drivespauseandplay. dragGridwith fewer tiles than the viewport holds covers it with no gap before and after a drag, and after resizing the viewport larger.- The grid's wheel pans sideways only, unless it captures both axes; then vertical wheels pan it and the page stays still.
- On touch, vertical swipes over the loop and an x-capturing grid scroll the page.
- Revert mid-throw: the throw stops, and the markup, including
styleattributes, matches its pre-build state exactly. - Reduced motion: both still drag, with no throw and no drift; the loop still lands on an item.
- A registered CustomEase name passed as
easeshapes the landing, like every recipe'seaseoption. flickCards: the front card is the only card notinert; neighbors mirror on both sides; far cards are hidden.- A drag past the threshold or a fast flick deals the next card; a short slow drag springs back. One card per gesture.
- Arrow keys on the deck,
next,prev, andtoIndextake the shortest way round; focus in a card leaving the front moves to the deck. - A click on a leaning card deals it; a click on a link in the front card follows it; a drag over that link does not.
- Revert mid-deal restores the markup,
styleattributes, and each card'sinertexactly. Reduced motion deals at once.
Physics
- Every piece is
aria-hidden, without ids, inside the layer, and removed when its flight ends;finishedresolves then. stop()removes every piece at once and is safe twice; the layer itself is never created or removed.- Live pieces across runs never exceed the budget; ended runs free it.
- Rain pieces start above the layer and fall out the bottom; burst pieces rise from the origin before falling.
- Reduced motion spawns nothing and
finishedis already resolved; the triggering action is never delayed.
SVG, counters, and marquees
- Text on a path:
pathScrubmoves onlystartOffset, follows scroll both ways, and rests attounder reduced motion;pathLoopstays within one lap, pauses on command and off screen; both restore the authoredstartOffset. - Drawn strokes start hidden without a flash and end at the SVG's own appearance after revert.
- A morphed icon returns to its original
don revert;set()after revert does nothing. - Counted figures keep prefix, suffix, separators, and decimals and end on the exact source text. Test three or more decimals, such as
99.999%, and the page locale's decimal mark. - While counting, neighbors do not shift and assistive technology finds only the final value.
- Odometer: rising values roll each column forward through 9 to 0 and falling values roll back; a new value mid-roll continues from where the columns are; assistive technology reads the latest value once;
revertleaves that value as plain text. - Marquee clones are
aria-hiddenandinertwith no duplicate ids; each item is announced and focused once. - The marquee loops seamlessly, slows on hover, and pauses on focus, off screen, and on
pause(). - Resizing rebuilds the clones to fill; revert restores the original markup exactly.
- Logo cycle: one cell swaps at a time, never the same cell twice running; every logo exists once, in a cell or the pool. It holds on
pause(), hover, focus inside, and off screen, and revert returns every logo to its original place with itsstyleattribute exact. - Reduced motion: strokes whole, figures final, no follower, marquee static; completion callbacks fire.
Smooth scroll, covers, and layout
- Smooth scroll: wheel and trackpad ease; keyboard, scrollbar, find-in-page, and touch stay native.
stop()holds the page;scrollTo(..., { immediate: true })still lands while stopped. ScrollTrigger effects fire at the eased position.destroy()removes the engine's classes, styles, and ticker callback. Reduced motion creates nothing. - Curtain with
tilt: panels lean in, sit square while covered, and tip the other way out. Withtitle: the text shows only while covered and restores on revert. - Curve cover: mid-sweep the edge's middle leads its corners; covered, the path fills the viewBox and takes clicks; revealed, it is hidden, empty, and click-through. A cover mid-reveal or reveal mid-cover turns the edge back. Reduced motion never shows it; revert restores the
<svg>style and the path'sd. - Curtain: at rest the panels are hidden and the page takes clicks; covered, the panels take them. A cover requested mid-reveal turns back from where the panels are. Reduced motion never shows a panel, and both timelines complete.
- Preloader: the count follows reported progress forward only,
aria-valuenowmatches it, andfinish()leaves it hidden and out of the accessibility tree. - Layout Flip: survivors slide, entering items grow in, leaving items shrink out while still displayed, and no target keeps an inline transform. The app's inline styles survive. A shared element morphs from the old box onto the new element, never onto a hidden original.
- Use the framework skill's
references/smooth-scroll.mdandreferences/transition-archetypes.mdchecks for navigation, history, and recovery.
Media, components, and hover
- Font axis hover: passes the running text checks; touch never grows a word; teardown restores the style attribute exactly.
- Directional fill: the fill opens from the edge the mouse entered and collapses onto the edge it left; keyboard focus fills from
focusFrom; a tap fills and clears on lift; teardown restores the fill'sclip-path. - State button: the button keeps its size;
loadingsetsaria-busyand spins;successfinishes the lap forward, draws the check, announces, and returns to the label;errorshakes and announces; reduced motion swaps only; revert removes icons and status and restores the label'sstyleattribute exactly, none included. - Press feedback: a press squashes and a release springs back to scale 1; the ripple centers on the press point, or the center for Enter and Space; a cancelled touch springs back; teardown removes ripples in flight and restores
position,overflow, and transform. - Shake: swings narrow each time and end at rest, the element's own transform returns on completion or kill, reduced motion stays still and still completes, and the error text and
aria-invalidappear with it. - Menu: links are out of the tab order at rest;
close()mid-open turns the wipe back from where it is; revert leaves no inline style. - Enter and exit: the closed state paints at build, before GSAP's first tick;
close()from the open rest plays the exit, not the entrance reversed;close()mid-entrance reverses without reaching the exit, andopen()mid-exit returns to the pause; each rest fires its callback once;easeReversechanges the reversed curve; revert restores inline styles. - Dialog: focus lands inside through
showModal()and returns to the trigger natively; Escape runs the exit whileopenstays true, then closes;close(value)setsreturnValue. - Disclosure: hidden or closed-
<details>panels are collapsed at build;open()ends at the exact content height with no inlineheightoroverflow; an interrupted open shrinks from its current height. - Tab indicator: its own box never changes; it lands within half a pixel of the tab, in RTL and after a sibling tab resizes.
- A waiting
onScrollimage reveal is clipped yet visible and in the accessibility tree; focus inside it opens it without scrolling. - The hover preview appears at the pointer, crossfades between items, hides on leave, ignores touch and pen, and a tap still follows the link.
- Scrub video builds nothing before metadata and returns
currentTimeto 0 at the top. The frame sequence loads nothing until its section nears, draws the nearest loaded frame when others fail, and teardown aborts loads. - Roll, sweep, and zoom answer the mouse and
:focus-visibleand ignore touch and pen; focus left by a tap or click does not hold them. textRollkeeps the control's box and accessible name, its copy isaria-hiddenwithout duplicated ids, and tightline-heightcrops no ascenders or descenders.- Reduced motion: reveals complete unclipped with callbacks, preview and video build nothing, the sequence draws one still, no roll or zoom, and the underline appears without moving.
Paging and sound
- Pager: one trackpad flick with a long inertia tail moves exactly one section; the next flick after a rest moves again.
- Swipes page on touch, pinch-zoom still works, and swipes inside
data-pager-ignorescroll that element. - Arrow, Page, Home, End, and Space keys page from the body; fields, tablists, and Space on a control keep their keys.
- Tabbing into a parked section shows it at once; neither the pager nor the document scrolls.
disable()stops gestures and keys; revert restores the scrolling layout and the document'soverflow.- Sound: no audio context exists until the toggle is pressed; a stored "on" unlocks on the first gesture.
- Repeated cues respect the gap and voice cap; cues on reversed timelines stay silent.
- Hiding the tab suspends audio; turning sound off fades, then suspends; revert closes the context.
- Reduced motion: the pager swaps instantly with
onChangestill firing; sound follows only its toggle.
Effect failure and restoration
- Throw before writes, after initial styles, and after a split or particle resource exists. Partial setup rolls back even without a returned handle.
- Owned timelines, delayed calls, tickers, observers, and listeners stop before restoration. Teardown twice stays safe and recreates no motion.
- After rollback, original nodes, text, links, ARIA, and app-owned inline styles match. Check hidden ancestors and masks, not just opacity.
- Inline-style comparisons include both values and
getPropertyPriority(); authored!importantdeclarations survive restoration across all snapshot helpers. - Deferred font or media work resolving after recovery starts no new split, hidden frame, or decorative completion.
- Use the framework skill's
references/initialization.mdfailure matrix for disabled JavaScript, blocked bundles, deadlines, navigation, and completion ownership. Repeat these checks with another brand's fonts and CSS.
SplitText cleanup stability
Apply stable typography and measure with the actual font, tracking, text, and container width:
- Capture the unsplit baseline after fonts load and target CSS applies. Record computed font, variation, and feature settings, tracking, leading, kerning, and ligatures.
- At the completion boundary, measure just before revert, just after, and on the next frame, capturing both painted states at equal scale. Holding at that boundary is fine; removing cleanup is not.
- Compare non-space character positions with DOM
Rangerectangles, re-querying text nodes after revert. Check heading height, line membership, and glyph edges, dots, and descenders. Wrapper rectangles cannot separate mask padding from glyph movement. - Repeat at desktop and mobile widths, near a line-break threshold, with reduced motion, and with interruption. Separate intended weight or tilt changes from cleanup movement. Accessible text and nested controls survive.
- With expanded masks, inspect both hidden reveal endpoints and the exit endpoint for ink leakage. Keep timing fixed; adjust travel only when leakage appears.
Record viewport, browser, font readiness, maximum position deltas, height, wrapping, and visual observations, without rounding to whole pixels. A repeatable multi-pixel snap fails even with stable height; invisible subpixel rounding does not.
Running text
For any hover or focus that changes a word's weight or width inside a line of other words, held in place:
- Record every word's box (
getBoundingClientRect, plusscrollY) at rest. - Hover each word in turn, wait for the move to settle, and record every other word's box again. Any change past half a pixel fails: a neighbor moved or a line rewrapped.
- Move away, wait for the release, and confirm the hovered word's box is back to its resting width and its inline styles are gone.
- Repeat at several widths, including one where a line is nearly full, since rounding errors only show near a break.
- Confirm no separator starts a line.
Report
Say which checks ran in a browser and which were static review. Never claim animation behavior was verified from code alone.