From gsap-frontend
Build distinctive, production-grade animated frontends with GSAP + ScrollTrigger (Next.js/React/Tailwind first, adaptable to any stack). Use when creating landing pages, marketing sites, hero sections, or any UI with scroll animations. Triggers include "GSAP", "gsap", "ScrollTrigger", "scroll animation", "scroll-triggered", "parallax", "pinned section", "sticky scroll", "horizontal scroll", "marquee", "kinetic typography", "reveal on scroll", "count-up", "gradient mesh", "glassmorphism", "animated landing page", "hero animation", or building a site "like cash.app / getduel / magic-receipt / pushapp". Covers GSAP setup, reusable primitives, copy-paste scroll patterns, performance + prefers-reduced-motion, and a catalog of design languages with reference screenshots.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gsap-frontend:gsap-frontendThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build fast, accessible, distinctive animated frontends with GSAP + ScrollTrigger.
assets/anim/Counter.tsxassets/anim/Marquee.tsxassets/anim/Reveal.tsxassets/anim/globals-snippet.cssassets/anim/gsap.tsassets/references/cashapp-hero.pngassets/references/cashapp-scroll1.pngassets/references/getduel-hero.pngassets/references/getduel-scroll1.pngassets/references/lazybooks-home-hero.pngassets/references/lazybooks-v1-hero.pngassets/references/lazybooks-v2-hero.pngassets/references/lazybooks-v3-hero.pngassets/references/lazybooks-v4-hero.pngassets/references/magic-receipt-hero.pngassets/references/magic-receipt-scroll1.pngassets/references/pushapp-hero.pngassets/references/pushapp-scroll1.pngreferences/design-languages.mdreferences/extending.mdBuild fast, accessible, distinctive animated frontends with GSAP + ScrollTrigger. This skill ships ready-to-copy animation primitives, copy-paste pattern recipes, a catalog of design languages (with reference screenshots), and the hard-won performance/accessibility fixes that keep scroll animations smooth and non-janky.
Default stack: Next.js (App Router) + React + Tailwind v4. The GSAP core and all
patterns are framework-agnostic — see references/setup.md for adapting to Vite,
plain React, or vanilla JS.
npm i gsap @gsap/react (GSAP is fully free incl. all plugins).assets/anim/{gsap.ts,Reveal.tsx,Counter.tsx,Marquee.tsx}
into the project (e.g. src/components/anim/) and paste assets/anim/globals-snippet.css
into the app's global stylesheet. Replace the example @theme tokens with the brand's
colours/fonts. Read references/setup.md.references/design-languages.md (a catalog of 13+
styles with reference screenshots in assets/references/). Each style maps to a motion
vocabulary and a set of patterns. Offer the user 2–4 options if the direction is open.references/patterns.md (headline reveal, pinned horizontal scroll, sticky product
story, parallax, colour-flip, count-up, marquee, gradient mesh, glass cards, two-tone
headings). Keep content in a single data module so sections stay tidy.references/gotchas.md before finishing.references/verify.md — production build + lint pass, scroll forward
and back, check prefers-reduced-motion (content fully visible, no motion) and a mobile
width (no overflow). Use the bundled scripts/capture-screenshots.py to grab frames.These prevent ~90% of the bugs encountered building real animated sites:
assets/anim/gsap.ts) and always animate inside
useGSAP(() => { … }, { scope: ref }). Never registerPlugin ad-hoc in components.gsap.matchMedia("(prefers-reduced-motion: no-preference)", () => {…}) and
return () => mm.revert(). Content must be fully visible by default — apply the
hidden start state only inside GSAP (so no-JS and reduced-motion users see everything).refreshAfterAssets(root.current)
from gsap.ts inside useGSAP and run its cleanup. This is the #1 fix for "jumpy"
scroll — async images change section heights and stale trigger positions.will-change-transform / transform-gpu to
scrubbed, parallax, and marquee layers. Use a numeric scrub (≈1–1.2) for smooth
pinned scroll; scrub: true for 1:1 parallax; scrub: 0.6 for snappy.overflow-x-clip, never overflow-hidden, on any ancestor of a position: sticky
element (overflow-hidden silently breaks sticky).start: "top 120px" to clear a
sticky header.color,
a white headline on a dark background is invisible — add text-white/brand colour.useGSAP (e.g. gsap.from(".hero-word", …)).
Never collect elements by mutating a ref array during render (lint: react-hooks/refs).Browse references/design-languages.md for the full catalog + screenshots. Fast map:
| Vibe the user wants | Design language | Signature motion |
|---|---|---|
| Bold, playful, colourful, "snappy" | Cash App / kinetic | colour-flip pinned statements, oversized word-reveal, marquee, count-up |
| Premium, dark, gym/tech energy | getDuel / DUELR (bold dark) | two-tone uppercase line-reveal, glowing pill, dark bordered cards, staggered reveals |
| Sleek, cinematic, app/product | magic-receipt / pushapp | gradient-mesh blobs, parallax floaters, glassmorphism cards, device float |
| Clean, trustworthy, content-led | minimal / editorial / Swiss | restrained reveal-on-scroll, subtle parallax, generous type |
| Story-driven product demo | sticky product story | scroll-synced sticky frame, sliding device screens, pinned horizontal gallery |
references/setup.md — install, the central registrar, useGSAP/matchMedia/cleanup
skeleton, refreshAfterAssets, Tailwind @theme tokens, adapting to other stacks.references/patterns.md — the heart: copy-paste recipes for every scroll pattern,
each with its exact ScrollTrigger config and motion gate.references/gotchas.md — symptom → cause → fix checklist of the real bugs (sticky,
jumpy scroll, marquee jitter, ultrawide breaks, grid-gap stretching, etc.).references/design-languages.md — catalog of 13+ styles, each mapped to patterns,
with reference screenshots in assets/references/ and live worked examples.references/verify.md — the Playwright verification playbook (build/lint, scroll,
reduced-motion, mobile) using the bundled capture script.references/extending.md — how to add sites you like to the catalog (self-extend).assets/anim/ — drop-in gsap.ts, Reveal.tsx, Counter.tsx, Marquee.tsx, and
globals-snippet.css (keyframes + example tokens). Brand-agnostic; copy as-is.assets/references/ — screenshots of cash.app, getduel.co.uk, magic-receipt.ai,
pushapp.co.uk, and example Lazybooks builds (home + v1–v4) for visual reference.scripts/capture-screenshots.py — self-contained Playwright CLI for capturing reference
and verification screenshots (--help). Playwright is optional (only this script needs
it; building sites does not). If it's missing, run the script with --install or install
with python3 -m pip install playwright && python3 -m playwright install chromium.This skill is self-extending. When the user shares URLs of sites whose style they like
(e.g. "add stripe.com and linear.app to the catalog"), follow references/extending.md:
WebSearch/WebFetch the site to read its design language, run scripts/capture-screenshots.py
to save hero + scrolled screenshots into assets/references/, then append a catalog entry to
references/design-languages.md (vibe, palette, type, layout, motion→patterns, screenshots).
The skill edits its own files in place; maintainers commit + push to share.
object-cover + object-[50%_38%] (or similar) to keep faces
/ focal points in frame when an image is constrained to an aspect ratio./v1–/v4, /versions
routes are full implementations of the patterns and design languages here.prefers-reduced-motion, and check a
~390px mobile width.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub cybertroniankelvin/gsap-frontend-skill --plugin gsap-frontend