Advanced GSAP Animations

VerifiedSafe

Create advanced web animations with GSAP: complex timelines, scroll-driven animations, SVG morphing, and React integration.

Sby Skills Guide Bot
DevelopmentIntermediate
8/5/2026
Claude CodeCursorWindsurfCopilotCodex
#gsap#animation#scrolltrigger#timeline#svg

Recommended for

Automated summary

This skill guides the creation of advanced web animations with GSAP: sequenced timelines, scroll-driven animations via ScrollTrigger, text effects, and React integration.

Strengths

  • Covers GSAP's three core primitives (to/from/set) with directly reusable examples
  • Explains timeline relative positioning ('-=0.3', '<') for orchestrating complex sequences
  • Details ScrollTrigger configuration, including pinning and scrub for scroll-linked animations
  • Provides an idiomatic React example with useGSAP and scope for automatic cleanup

Limitations

  • Does not actually cover SVG morphing or text effects despite mentioning them in the description, as no concrete examples are given
  • No guidance on performance, debugging, or common ScrollTrigger pitfalls
  • Commercial plugins (MorphSVG, SplitText) are only mentioned without a detailed free alternative
When to use it

Use it when you need to build elaborate animation timelines, scroll-driven effects, or sequences that exceed CSS capabilities.

When not to use it

Avoid it for simple transitions or micro-interactions where CSS is enough, or when the project cannot depend on an external JavaScript library.

Security analysis

Safe
Quality score92/100

The skill provides instructional code snippets for using GSAP, a legitimate animation library. No tools are declared, and the code examples only demonstrate standard animation techniques with no destructive, exfiltrating, or obfuscated operations.

No concerns found

How this analysis is made

Examples

Hero section timeline
Build a GSAP timeline that animates my logo, then staggers in the nav links, then slides in the hero text and pops the CTA button.
Scroll-pinned horizontal section
Create a GSAP ScrollTrigger that pins a section and scrubs horizontally through a wide image gallery as the user scrolls.
React card reveal
Write a React component using useGSAP that fades in a grid of cards with a stagger when the section scrolls into view.

name: gsap description: >- Create advanced animations with GSAP. Use when building complex timelines, scroll-driven animations, SVG morphing, text animations, or high-performance web animations beyond CSS capabilities. license: Apache-2.0 compatibility: 'Any JavaScript, React, Vue' metadata: author: terminal-skills version: 1.0.0 category: development tags: [gsap, animation, scrolltrigger, timeline, svg]

GSAP

Overview

GSAP (GreenSock Animation Platform) is the most powerful web animation library. Handles complex timelines, scroll-driven animations, SVG morphing, text effects, and physics-based motion. Used by Apple, Google, Nike for landing pages and product showcases. Free for most uses.

Instructions

Step 1: Basic Animations

import gsap from 'gsap'

// Animate to
gsap.to('.hero-title', { opacity: 1, y: 0, duration: 1, ease: 'power3.out' })

// Animate from
gsap.from('.card', { opacity: 0, y: 50, duration: 0.8, stagger: 0.15 })

// Set immediately
gsap.set('.hidden-element', { opacity: 0, y: 20 })

Step 2: Timelines

// Sequenced animations — play in order
const tl = gsap.timeline({ defaults: { duration: 0.6, ease: 'power2.out' } })

tl.from('.logo', { scale: 0, rotation: -180 })
  .from('.nav-link', { opacity: 0, y: -20, stagger: 0.1 }, '-=0.3')  // overlap by 0.3s
  .from('.hero-text', { opacity: 0, x: -50 })
  .from('.cta-button', { opacity: 0, scale: 0.8 }, '<')               // start at same time as previous

// Control
tl.play()
tl.reverse()
tl.pause()
tl.seek(1.5)  // jump to 1.5 seconds

Step 3: ScrollTrigger

import { ScrollTrigger } from 'gsap/ScrollTrigger'
gsap.registerPlugin(ScrollTrigger)

// Animate when scrolling into view
gsap.from('.feature-section', {
  scrollTrigger: {
    trigger: '.feature-section',
    start: 'top 80%',        // trigger when top of element hits 80% of viewport
    end: 'bottom 20%',
    toggleActions: 'play none none reverse',  // onEnter, onLeave, onEnterBack, onLeaveBack
  },
  opacity: 0,
  y: 100,
  duration: 1,
})

// Pin section during scroll
gsap.to('.horizontal-section', {
  x: () => -(document.querySelector('.horizontal-section').scrollWidth - window.innerWidth),
  scrollTrigger: {
    trigger: '.horizontal-wrapper',
    pin: true,
    scrub: 1,                // smooth scrubbing (1 second lag)
    end: () => '+=' + document.querySelector('.horizontal-section').scrollWidth,
  },
})

Step 4: React Integration

import { useRef } from 'react'
import { useGSAP } from '@gsap/react'
import gsap from 'gsap'

function AnimatedSection() {
  const container = useRef(null)

  useGSAP(() => {
    gsap.from('.card', {
      opacity: 0, y: 40, stagger: 0.1, duration: 0.6,
      scrollTrigger: { trigger: container.current, start: 'top 80%' },
    })
  }, { scope: container })

  return (
    <div ref={container}>
      <div className="card">Card 1</div>
      <div className="card">Card 2</div>
      <div className="card">Card 3</div>
    </div>
  )
}

Guidelines

  • GSAP is free for public websites. Commercial plugins (MorphSVG, SplitText) need a license.
  • Use useGSAP hook in React — it handles cleanup automatically on unmount.
  • ScrollTrigger with scrub creates scroll-linked animations (parallax, progress).
  • stagger animates multiple elements sequentially — cleaner than manual delays.
  • GSAP outperforms CSS animations for complex sequences — requestAnimationFrame-based.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/advanced-gsap-animations-msfn196l' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/advanced-gsap-animations-msfn196l/download' --output '.skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md.part' && mv '.skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md.part' '.skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Environment declared by the author: Any JavaScript, React, Vue

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md' && test -s '.skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/gsap' && cp -R '.skill-downloads/advanced-gsap-animations-msfn196l' '.claude/skills/gsap'

Cursor
test -f '.skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md' && test -s '.skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/gsap' && cp -R '.skill-downloads/advanced-gsap-animations-msfn196l' '.cursor/skills/gsap'

Codex
test -f '.skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md' && test -s '.skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/gsap' && cp -R '.skill-downloads/advanced-gsap-animations-msfn196l' '.agents/skills/gsap'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/advanced-gsap-animations-msfn196l'

openskills read 'advanced-gsap-animations-msfn196l'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/advanced-gsap-animations-msfn196l/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills