Provides syntax and best practices for creating animations using GSAP.
Install
mkdir -p .claude/skills/gsap-efeoncepro && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12576" && unzip -o skill.zip -d .claude/skills/gsap-efeoncepro && rm skill.zipInstalls to .claude/skills/gsap-efeoncepro
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.Key capabilities
- →Animate from current state to target state (gsap.to)
- →Animate from a defined state to current state (gsap.from)
- →Animate between explicit start and end states (gsap.fromTo)
- →Apply properties immediately (gsap.set)
- →Create and control animation timelines
How it works
The skill uses GSAP methods like gsap.to(), gsap.from(), and gsap.timeline() to create and control animations, applying various properties and easing functions.
Inputs & outputs
When to use gsap
- →Create web animations
- →Implement GSAP timelines
- →Optimize animation performance
About this skill
GSAP
Core Tween Methods
- gsap.to(targets, vars) — animate from current state to
vars. Most common. - gsap.from(targets, vars) — animate from
varsto current state (entrances). - gsap.fromTo(targets, fromVars, toVars) — explicit start and end.
- gsap.set(targets, vars) — apply immediately (duration 0).
Always use camelCase property names (e.g. backgroundColor, rotationX).
Common vars
- duration — seconds (default 0.5).
- delay — seconds before start.
- ease —
"power1.out"(default),"power3.inOut","back.out(1.7)","elastic.out(1, 0.3)","none". - stagger — number
0.1or object:{ amount: 0.3, from: "center" },{ each: 0.1, from: "random" }. - overwrite —
false(default),true, or"auto". - repeat — number or
-1for infinite. yoyo — alternates direction with repeat. - onComplete, onStart, onUpdate — callbacks.
- immediateRender — default
truefor from()/fromTo(). Setfalseon later tweens targeting the same property+element to avoid overwrite.
Transforms and CSS
Prefer GSAP's transform aliases over raw transform string:
| GSAP property | Equivalent |
|---|---|
x, y, z | translateX/Y/Z (px) |
xPercent, yPercent | translateX/Y in % |
scale, scaleX, scaleY | scale |
rotation | rotate (deg) |
rotationX, rotationY | 3D rotate |
skewX, skewY | skew |
transformOrigin | transform-origin |
- autoAlpha — prefer over
opacity. At 0: also setsvisibility: hidden. - CSS variables —
"--hue": 180. - svgOrigin (SVG only) — global SVG coordinate space origin. Don't combine with
transformOrigin. - Directional rotation —
"360_cw","-170_short","90_ccw". - clearProps —
"all"or comma-separated; removes inline styles on complete. - Relative values —
"+=20","-=10","*=2".
Function-Based Values
gsap.to(".item", {
x: (i, target, targets) => i * 50,
stagger: 0.1,
});
Easing
Built-in eases: power1–power4, back, bounce, circ, elastic, expo, sine. Each has .in, .out, .inOut.
Defaults
gsap.defaults({ duration: 0.6, ease: "power2.out" });
Controlling Tweens
const tween = gsap.to(".box", { x: 100 });
tween.pause();
tween.play();
tween.reverse();
tween.kill();
tween.progress(0.5);
tween.time(0.2);
gsap.matchMedia() (Responsive + Accessibility)
Runs setup only when a media query matches; auto-reverts when it stops matching.
let mm = gsap.matchMedia();
mm.add(
{
isDesktop: "(min-width: 800px)",
reduceMotion: "(prefers-reduced-motion: reduce)",
},
(context) => {
const { isDesktop, reduceMotion } = context.conditions;
gsap.to(".box", {
rotation: isDesktop ? 360 : 180,
duration: reduceMotion ? 0 : 2,
});
},
);
Timelines
Creating a Timeline
const tl = gsap.timeline({ defaults: { duration: 0.5, ease: "power2.out" } });
tl.to(".a", { x: 100 }).to(".b", { y: 50 }).to(".c", { opacity: 0 });
Position Parameter
Third argument controls placement:
- Absolute:
1— at 1s - Relative:
"+=0.5"— after end;"-=0.2"— before end - Label:
"intro","intro+=0.3" - Alignment:
"<"— same start as previous;">"— after previous ends;"<0.2"— 0.2s after previous starts
tl.to(".a", { x: 100 }, 0);
tl.to(".b", { y: 50 }, "<"); // same start as .a
tl.to(".c", { opacity: 0 }, "<0.2"); // 0.2s after .b starts
Labels
tl.addLabel("intro", 0);
tl.to(".a", { x: 100 }, "intro");
tl.addLabel("outro", "+=0.5");
tl.play("outro");
tl.tweenFromTo("intro", "outro");
Timeline Options
- paused: true — create paused; call
.play()to start. - repeat, yoyo — apply to whole timeline.
- defaults — vars merged into every child tween.
Nesting Timelines
const master = gsap.timeline();
const child = gsap.timeline();
child.to(".a", { x: 100 }).to(".b", { y: 50 });
master.add(child, 0);
Playback Control
tl.play(), tl.pause(), tl.reverse(), tl.restart(), tl.time(2), tl.progress(0.5), tl.kill().
Performance
Prefer Transform and Opacity
Animating x, y, scale, rotation, opacity stays on the compositor. Avoid width, height, top, left when transforms achieve the same effect.
will-change
will-change: transform;
Only on elements that actually animate.
gsap.quickTo() for Frequent Updates
let xTo = gsap.quickTo("#id", "x", { duration: 0.4, ease: "power3" }),
yTo = gsap.quickTo("#id", "y", { duration: 0.4, ease: "power3" });
container.addEventListener("mousemove", (e) => {
xTo(e.pageX);
yTo(e.pageY);
});
Stagger > Many Tweens
Use stagger instead of separate tweens with manual delays.
Cleanup
Pause or kill off-screen animations.
Enterprise Async Loader Overlays
For critical waits such as report generation, use a page-level overlay, not a dock-only spinner. The
overlay should isolate the whole viewport (position: fixed, explicit z-index, backdrop/isolation)
so lower page sections and icons cannot leak through while the system owns the user's attention.
Build a master timeline with labels for entrance, signal loop, stage-copy updates, ready handoff and exit. Continuous motion should be distributed across the composition (background scan, cards, progress, focal mark, copy/type effect), not concentrated in one tiny moving element. Keep copy calm, real and lightly human; avoid exposing raw internal terms unless the user benefits from them.
When the copy says "Efeonce", show the Efeonce mark/logo rather than a plain text pill. Avoid decorative bars or floating shapes unless they communicate analysis progress, evidence assembly, or handoff state.
Respect prefers-reduced-motion with a static staged state and no infinite loops. Animate transform
and opacity, kill timelines on navigation/unmount, and keep the final ready transition smooth:
ready state -> premium "report ready/opening" overlay -> route/report entrance.
References (loaded on demand)
- references/effects.md — Drop-in effects: typewriter text, audio visualizer. Read when needing ready-made effect patterns for HyperFrames.
Best Practices
- Use camelCase property names; prefer transform aliases and autoAlpha.
- Prefer timelines over chaining with delay; use the position parameter.
- Add labels with
addLabel()for readable sequencing. - Pass defaults into timeline constructor.
- Store tween/timeline return value when controlling playback.
Do Not
- Animate layout properties (width/height/top/left) when transforms suffice.
- Use both svgOrigin and transformOrigin on the same SVG element.
- Chain animations with delay when a timeline can sequence them.
- Create tweens before the DOM exists.
- Skip cleanup — always kill tweens when no longer needed.
When not to use it
- →When animating layout properties like width, height, top, or left when transforms suffice
- →When chaining animations with delay instead of using a timeline
- →When creating tweens before the DOM exists
Limitations
- →Requires camelCase property names for GSAP
- →Prefers transform aliases over raw transform strings
- →Avoids animating layout properties when transforms suffice
How it compares
This skill provides a structured reference for GSAP animations, including performance best practices and timeline control, unlike ad-hoc CSS animations or manual JavaScript timing.
Compared to similar skills
gsap side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| gsap (this skill) | 0 | 2mo | Review | Intermediate |
| scroll-experience | 101 | 6mo | No flags | Intermediate |
| interaction-design | 15 | 5mo | No flags | Intermediate |
| motion | 10 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
scroll-experience
davila7
Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.
interaction-design
wshobson
Design and implement microinteractions, motion design, transitions, and user feedback patterns. Use when adding polish to UI interactions, implementing loading states, or creating delightful user experiences.
motion
onmax
Use when adding animations with Motion Vue (motion-v) - provides motion component API, gesture animations, scroll-linked effects, layout transitions, and composables for Vue 3/Nuxt
frontend-enhancer
ailabs-393
This skill should be used when enhancing the visual design and aesthetics of Next.js web applications. It provides modern UI components, design patterns, color palettes, animations, and layout templates. Use this skill for tasks like improving styling, creating responsive designs, implementing modern UI patterns, adding animations, selecting color schemes, or building aesthetically pleasing frontend interfaces.
threejs-postprocessing
CloudAI-X
Three.js post-processing - EffectComposer, bloom, DOF, screen effects. Use when adding visual effects, color grading, blur, glow, or creating custom screen-space shaders.
animation-performance-retro
TheOrcDev
Optimize 8-bit animations for smooth performance. Apply when creating animated pixel art, game UI effects, or any retro-styled animations.