accessible-animation

Implements tiered prefers-reduced-motion handling for CSS, GSAP, Framer Motion, and Lenis animations.

3|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/langgenius/due-date-hq-jwl --skill accessible-animation-langgenius
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: accessible-animation
Source: https://github.com/langgenius/due-date-hq-jwl/tree/main/.claude/skills/accessible-animation
Command: npx skills add https://github.com/langgenius/due-date-hq-jwl --skill accessible-animation-langgenius

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, smooth scroll), soften (replace movement with ≤200ms opacity fades), and keep (opacity, color, focus rings, spinners) — instead of an all-or-nothing kill switch. - CSS and JS gating patterns: Provides media-query overrides, a global safety net using 0.01ms durations, matchMedia listeners with live change detection, a React useReducedMotion hook, and library-specific integrations for GSAP matchMedia, Framer Motion MotionConfig, and Lenis start/stop. - WCAG compliance mapping: Covers 2.3.3 Animation from Interactions, technique C39, and 2.2.2 Pause/Stop/Hide including pause controls for auto-playing carousels and marquees. - Use Case: When auditing a landing page with a GSAP parallax hero and Lenis smooth scroll, apply the tiered patterns so reduced-motion users get a static hero with cross-fading cards while everyone else keeps the full motion. ## Quick Start Ask the AI to audit the animations in your page and add tiered prefers-reduced-motion support for CSS and any GSAP or Framer Motion effects.

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 it inside a @media (prefers-reduced-motion: reduce) block. Use a global safety net with 0.01ms durations and animation-iteration-count: 1, then layer targeted overrides that remove transforms while keeping opacity and color transitions.

How do I gate GSAP animations for reduced motion users?▼

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.

Should I disable all animations when prefers-reduced-motion is set?▼

No, removing all animation is an over-correction that causes teleporting elements and loses affordances like focus rings and loading spinners. Classify motion into tiers: remove parallax and large movement, soften small entrances into fades, and keep opacity and color transitions.

Does Framer Motion support reduced motion automatically?▼

Yes, wrap your app in MotionConfig with reducedMotion="user" so child motion components automatically drop transform and layout animations while keeping opacity. For per-component control, use Framer's useReducedMotion hook to swap variant definitions.

Why does my reduced-motion CSS break transitionend event handlers?▼

Setting animation-duration or transition-duration to 0s prevents animationend and transitionend events from firing, breaking JS that waits on them. Use 0.01ms instead so the events still fire while motion appears instant.

How do I handle Lenis smooth scroll for reduced motion users?▼

Do not instantiate Lenis at all when matchMedia('(prefers-reduced-motion: reduce)').matches is true, since smooth-scroll hijacking is a Tier 1 vestibular trigger. Add a change listener to destroy or recreate the instance when the OS setting toggles.