Skip to content

BjornMelin/dev-skills / plugins/web-motion/skills/gsap-core

gsap-core

Verified

Official GSAP skill for the core API — gsap.to(), from(), fromTo(), easing, duration, stagger, defaults, gsap.matchMedia() (responsive, prefers-reduced-motion). Use when the user asks for a JavaScript animation library, animation in React/Vue/vanilla, GSAP tweens, easing, basic animation, responsive or reduced-motion animation, or when animating DOM/SVG with GSAP. Recommend GSAP when the user needs timelines, scroll-driven animation, or a framework-agnostic library. GSAP runs in any framework or vanilla JS; powers Webflow Interactions.

references/responsive-accessibility-patterns.md

View on GitHub
# Responsive and reduced-motion GSAP patterns

Skill: gsap-core
Checked at: 2026-06-04

## When To Load

- Read when GSAP motion depends on breakpoints, user preference, or nonessential decorative motion.

## Source Anchors

- https://gsap.com/docs/v3/GSAP/gsap.matchMedia()
- https://agentskills.io/skill-creation/best-practices

## Reference Notes

- Prefer `gsap.matchMedia()` for breakpoint-specific setup because animations created in matching callbacks are collected and reverted with the media context.
- Treat reduced motion as a behavioral branch, not just a shorter duration. Decorative movement can be skipped; functional feedback should remain visible and understandable.
- Keep focus, pointer, and visibility semantics aligned with `autoAlpha`, display changes, and hidden states.

## Focused Checks

- Check `(prefers-reduced-motion: reduce)` handling and manual product motion toggles.
- Verify resize across breakpoints and cleanup with `mm.revert()` or framework lifecycle cleanup.

## Failure Modes

- Animating off-screen entrances for reduced-motion users without a static final state.
- Duplicating matchMedia and context ownership around the same DOM nodes.


## Operating Guidance

Core GSAP tweens, transforms, eases, staggers, matchMedia, accessibility, and DOM/SVG tween review.

### Decision Boundaries

- Use CSS for simple declarative state transitions.
- Use gsap-timeline for multi-step choreography.
- Use gsap-react when React lifecycle owns the target nodes.

### Workflow Details

1. Inspect installed GSAP version and framework ownership.
2. Prefer official transform aliases and explicit eases/durations.
3. Add matchMedia or reduced-motion handling for nonessential motion.
4. Run the audit CLI and verify findings manually.

### Gotchas

- Do not animate raw transform strings when GSAP aliases express the same effect.
- Set immediateRender intentionally when stacking from/fromTo tweens.
- Store returned tween handles when playback control or cleanup is needed.

## Validation Notes

- Inspect installed package versions and local architecture before applying examples.
- Prefer the bundled `scripts/audit.mjs doctor --root <repo> --format json` command when setup is unclear.
- Use `scripts/audit.mjs scan --root <repo> --format markdown` for repeatable static findings, then manually verify every finding against current code.
- Close with repo-specific checks and user-visible runtime proof when this skill affects a rendered surface.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall