iotron/gsap-cookbook/gsap-cursor
Claude Code and agent skill by iotron/gsap-cookbook
- community
Checking that the SKILL.md file is still in the repository.
Production recipes for cursor and pointer-driven GSAP animations. Companion to official gsap-core and gsap-performance skills (API reference). Triggers: cursor follower, cursor effect, mouse follower, magnetic button, spotlight cursor, cursor trail, particle trail, spring cursor, elastic cursor, pointer animation, custom cursor, cursor glow, clipPath cursor, quickTo cursor, image preview hover, perspective tilt, 3D tilt cursor. Non-triggers: Not for hover/tilt card effects (use gsap-interact), not for scroll animations (use gsap-scroll), not for general mouse events without cursor effects. Outcome: Produces cursor-driven animation effects with proper cleanup, overwrite management, and performance optimization (quickTo, ticker, will-change lifecycle).
Install
npx vskill@latest install iotron/gsap-cookbook/gsap-cursorSKILL.md
The same SKILL.md was published earlier as iotron/gsap-cookbook/gsap-cursor.
GSAP Cursor — Pointer-Driven Effects
Flow: gsap-setup → gsap-animate → gsap-cursor → gsap-optimise → gsap-test
Companion: For GSAP core tween API, invoke gsap-core. For performance methods, invoke gsap-performance. This skill covers cursor effect recipes only. Requires:greensock/gsap-skills
All patterns assume gsap.context() cleanup is in place (see gsap-animate skill).
1. Magnetic Buttons (quickTo)
gsap.quickTo pre-compiles a tween — 50-250% faster than gsap.to for frequent updates.
See gsap-performance skill for quickTo vs quickSetter API comparison.
2. Flair Particle Trail
Distance-based particle spawning using gsap.ticker and pool recycling. Elements reappear at the cursor, animate out, then recycle via gsap.utils.wrap.
Core loop (runs every tick via gsap.ticker.add):
Spawn: gsap.set positions element at cursor, gsap.utils.wrap(0, pool.length) cycles the index, timeline scales + fades + drops the particle.
Full implementation with pool setup and animation timeline inreferences/cursor-patterns.md.
3. Spring Physics Elastic Followers
Multiple blobs chase the cursor with different duration values for a staggered, physics-like feel. Each blob uses elastic.out easing and overwrite: 'auto'.
Rest positions are percentage-based (containerWidth * pct / 100), recalculated on reset.
Full implementation with blob config, setup, and reset inreferences/cursor-patterns.md.
4. Spotlight Cursor (Clip-Path Circle)
Reveal a hidden layer by animating a clipPath circle to follow the cursor.
Initial state: gsap.set(spotlight, { clipPath: 'circle(0px at 50% 50%)' }) for clean revert.
Full implementation with hide animation inreferences/cursor-patterns.md.
5. Cursor-Tracking Image Preview
Images follow the cursor when hovering over list items. Uses gsap.quickTo with a two-arg snap on first enter to avoid interpolation lag.
Paused autoAlpha tween toggles visibility via play()/reverse() on mouseenter/mouseleave.
Full implementation inreferences/cursor-patterns.md.
6. Cursor-Driven Perspective Tilt
3D perspective tilt driven by pointer position. Parent gets perspective: 650, children rotate/translate via gsap.quickTo + gsap.utils.interpolate.
Outer element rotates (rotationX/Y), inner element translates (x/y) for parallax depth.
Full implementation inreferences/cursor-patterns.md.
7. Best Practices
Cleanup checklist
- Every cursor tween registered via
ctx.add('name', fn) ctx.revert()called inonUnmountedquickToinstances created inonMounted, not in handlerswill-changereleased inonComplete, never permanentgsap.ticker.remove(fn)in cleanup for ticker-based effects
References
references/cursor-patterns.md— Flair particle trail, spring physics followers, spotlight cursor, circuit glow, cursor-tracking image preview, cursor-driven perspective tilt
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/gsap-cursor/SKILL.md
Popularity
- Repository stars
- 8
- 7-day trend score
- 11
Stars and forks are for the whole GitHub repository, not this skill alone. 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
[](https://verified-skill.com/skills/iotron/gsap-cookbook/gsap-cursor)