accessible-animation

Implement tiered prefers-reduced-motion handling for CSS and JavaScript animations.

52|3|Updated Aug 20, 2026
One-click install
npx skills add https://github.com/Wayn-Git/Amethyst --skill accessible-animation-wayn-git
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: accessible-animation
Source: https://github.com/Wayn-Git/Amethyst/tree/main/agents/skills/accessible-animation
Command: npx skills add https://github.com/Wayn-Git/Amethyst --skill accessible-animation-wayn-git

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Web animations like parallax, large slides, and smooth-scroll hijacking can trigger nausea, dizziness, and migraines for users with vestibular disorders, and the common fix of removing all animation over-corrects by stripping useful cues like focus rings and loading indicators. ## Core Features & Use Cases - Tiered Motion Classification: Sorts every animation into three tiers — remove (parallax, zoom, spin, marquees), soften (replace movement with ≤200ms opacity fades), and keep (fades, color transitions, focus rings, spinners). - CSS and JS Gating: Provides media-query overrides with the 0.01ms safety-net pattern, plus matchMedia gating for GSAP, Framer Motion, Lenis, and canvas animations that CSS cannot reach. - React Hook and Live Updates: Ships a useReducedMotion hook with SSR-safe hydration and change listeners so toggling the OS setting takes effect without a page reload. - Use Case: When a user reports motion sickness on a landing page with a GSAP parallax hero and Lenis smooth scroll, apply this Skill to remove the parallax under reduced motion, skip Lenis instantiation, and keep opacity fades intact, then screenshot both states with Playwright to verify. ## Quick Start Audit the animations in my web page and add tiered prefers-reduced-motion support for the CSS transitions and the GSAP hero animation.

Frequently Asked Questions about accessible-animation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I respect prefers-reduced-motion in CSS?▼

Write motion as the default, then override under the @media (prefers-reduced-motion: reduce) query. Use a global safety net with animation-duration and transition-duration set to 0.01ms (not 0s, which breaks transitionend listeners), then layer targeted overrides that remove transforms while keeping opacity fades.

How to gate GSAP animations for reduced motion?▼

Use gsap.matchMedia() with conditions for no-preference and reduce, defining full motion in one branch and short opacity fades in the other. GSAP automatically reverts tweens and restores styles when the OS setting changes, so cleanup happens without manual teardown.

Does Framer Motion support reduced motion automatically?▼

Yes. Setting MotionConfig reducedMotion="user" at the app root makes every child motion component drop transform and layout animations while keeping opacity. For per-component control, use Framer's own useReducedMotion hook to swap variant definitions.

Why does animation-duration 0s break my code?▼

Setting durations to 0s prevents animationend and transitionend events from firing, which breaks JavaScript that waits on those events. Use 0.01ms instead so the events still fire while the motion appears instant.

Should I remove all animation for reduced motion users?▼

No. Removing everything causes teleporting elements and strips useful affordances like focus rings and loading spinners. Classify motion into tiers: remove parallax and large movement, soften small entrances into short fades, and keep opacity, color, and essential feedback motion.

How do I test prefers-reduced-motion without changing OS settings?▼

Use Chrome DevTools Rendering panel to emulate the media feature, or run Playwright screenshots with --reduced-motion=reduce. For JS-gated code, add a URL parameter like ?reduce=1 that forces the reduced code path since CSS media queries cannot be toggled from JavaScript.