arayaroma/ether/a11y-media-motion

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when adding CSS/JS animations or transitions in a React app — respecting prefers-reduced-motion via a hook. Pair with react-animation for the Framer Motion side of the same component.

Install

npx vskill@latest install arayaroma/ether/a11y-media-motion

SKILL.md

Respecting reduced motion

Some users set "reduce motion" at the OS level (vestibular disorders, motion sickness, or just preference) — animations that ignore this setting are an accessibility failure, not just a UX nitpick.

tsx
export function useReducedMotion(): boolean {
const [prefersReduced, setPrefersReduced] = useState(false);
useEffect(() => {
const mq = window.matchMedia('(prefers-reduced-motion: reduce)');
setPrefersReduced(mq.matches);
const handler = (e: MediaQueryListEvent) => setPrefersReduced(e.matches);
mq.addEventListener('change', handler);
return () => mq.removeEventListener('change', handler);
}, []);
return prefersReduced;
}
export function AnimatedCard({ children }: { children: React.ReactNode }) {
const reduceMotion = useReducedMotion();
return <div style={{ transition: reduceMotion ? 'none' : 'transform 300ms ease' }}>{children}</div>;
}

Rules

  • Read the media query on mount (don't assume false) — a user who already has the OS setting on

should never see the first animation either.

  • Subscribe to change — the setting can flip while the app is open (OS settings panel).
  • "Respect" doesn't have to mean zero animation: shrinking to opacity-only fades, or cutting

duration drastically, is often enough — full removal is only required for large transform/parallax/autoplay motion.

  • Framer Motion has its own useReducedMotion (from the framer-motion package) that does the

same thing — prefer that one over hand-rolling this hook in a Framer Motion codebase, to avoid two separate media-query listeners.

Related

  • react-animation — the Framer Motion transitions this hook should gate.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/arayaroma/ether/a11y-media-motion/badge)](https://verified-skill.com/skills/arayaroma/ether/a11y-media-motion)

Something wrong with this skill or its page? Tell us.