Motion & accessibility
What every component does for people who turn motion down, on touch screens, and when it's time to leave the page.
Reduced motion
Every component checks prefers-reduced-motion. When it's set, the component jumps to its finished state instead of animating: a reveal is simply shown, a fill is simply filled, a magnetic pull doesn't pull. Nothing is hidden or broken, and nothing waits on an animation that won't play.
Those branches are part of the component. Leave them in.
Touch screens
Hover and cursor effects need a pointer. On touch screens each component falls back to something sensible, and its resource notes say what that is: the Magnetic Button, for example, drops the pull on narrow screens and keeps the fill on tap. Test on a phone before you ship; the fallback is deliberate, but it's a different thing to look at.
Several on one page
Instances are independent. Ten magnetic buttons on one page each read their own attributes and run their own tweens. The script is one file, loaded once, that boots them all.
Leaving the page
destroy() removes everything a component made: tweens, ScrollTriggers, observers, event listeners, animation frames. In single-page apps, call it (or let the React component unmount) before the markup goes, so nothing keeps running against elements that are no longer there. See the window.au API.
Keyboard and semantics
Components are built on the ordinary elements for the job: links are <a>, triggers are <button>, lists are lists, with the labels the markup shows. Focus and tabbing work as they do on any page. If you swap an element for another, keep the attributes the script looks for.
When something is off
Each script logs one clear line to the console if it can't start: a missing dependency, a missing attribute. That line is the first place to look.