taste-gsap
Skill1 starsChanged 3 months agoMITView on GitHub
GSAP implementation craft for agent-built sites: timeline architecture, gsap.context and matchMedia, ScrollTrigger pin and scrub hygiene, SplitText discipline, transform-only animation, refresh-after-fonts, and full prefers-reduced-motion gating. The 90% of award-tier motion is structure, not effects — this is that 90%. Use whenever generating GSAP animation code. Stack on the design-taste core skill and taste-motion.
In this repository23 other files it gives its agents.
- brutalist-industrialSkill
- cinematic-motionSkill
- corporate-trustSkill
- dark-techSkill
- design-tasteSkill
- editorial-minimalSkill
- japanese-minimalSkill
- neo-brutalismSkill
- playful-colorSkill
- quiet-luxurySkill
- retro-printSkill
- taste-accessibilitySkill
- taste-brand-identitySkill
- taste-code-craftSkill
- taste-code-reviewSkill
- taste-colorSkill
- taste-design-reviewSkill
- taste-design-systemSkill
- taste-landing-pageSkill
- taste-motionSkill
- taste-typographySkill
- taste-ux-copySkill
- taste-web-performanceSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Max two pinned sections per page: Every pin costs the scroll thread.
- Very specific: line 39
Never pin inside another pin.
- Very specific: line 40
Test pins at 768px width before shipping — pinned sections that trap mobile users are a bug, not a feature (this is why pins live in the …
- Very specific: line 48
Keep 60fps honesty: no 200-element stagger in one frame, no scrubbing 40 DOM properties.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
taste-gsap
GSAP is a scalpel, not a glitter gun. One clean pinned section beats nine parallax layers — and survives a code review.
1. ARCHITECTURE (The Non-Negotiable Shell)
- Wrap every page's animations in a single
gsap.context(() => { ... }, rootElement)— it scopes selectors and gives you instant teardown. - Gate everything through
gsap.matchMedia():(prefers-reduced-motion: no-preference)— all animation lives here. Reduced-motion users get the static, complete page.(min-width: 768px)— heavy effects (pins, scrubs, per-character splits) desktop-only; small screens get fades or nothing.
- The matchMedia callback returns a cleanup function; on SPAs, call
ctx.revert()on unmount. - One timeline per section, named by section; never one giant global timeline with 40 tweens.
- Lenis (free, not ScrollSmoother):
new Lenis({ duration: ~1.1, anchors: true }), pipe it to ScrollTrigger withlenis.on("scroll", ScrollTrigger.update)+gsap.ticker.add(t => lenis.raf(t * 1000))+gsap.ticker.lagSmoothing(0).lenis.stop()during the preloader,lenis.start()after. Never smooth-scroll under reduced motion.
2. PIN & SCRUB HYGIENE (Where Agents Fail Loudest)
- Max two pinned sections per page. Every pin costs the scroll thread. Two is the budget; one is the norm.
- Pins:
pin: true, pinSpacing: true(default — keep it),start: "top top",end: "+=200%"to"+=300%". Longer ends = slower scrub = more jank on mobile. - Horizontal galleries (the signature Awwwards move): pin the section, translate the track (
xonly, neverleft),end: () => "+=" + (track.scrollWidth - innerWidth)so the distance recalculates on resize,scrub: 1, desktop-only. Nativeoverflow-x+ scroll-snap must remain as the no-JS / reduced-motion fallback. - Drag carousels (Magma-school):
Draggable.create(track, { type: "x", inertia: true, bounds: () => ({ minX: -(track.scrollWidth - wrap.offsetWidth), maxX: 0 }) })— bounds as a function so it recalibrates on resize.edgeResistance~0.9, nativeoverflow-x+ snap as the no-JS fallback, and a cursor/UI hint that the strip is draggable. scrub: 0.6–1on heavy sections;scrub: trueonly on trivial tweens. A scrubbed tween without smoothing fights the scroll.- Never pin inside another pin; never start a second pin before the first's spacer ends.
ScrollTrigger.refresh()after fonts/images (window.load+document.fonts.ready) or everything misaligns. - Test pins at 768px width before shipping — pinned sections that trap mobile users are a bug, not a feature (this is why pins live in the
(min-width: 768px)gate). invalidateOnRefresh: trueon refresh-dependent triggers so re-layouts don't drift.
3. WHAT TO ANIMATE (Transform and Opacity Only)
- Animate
x,y,scale,rotation,opacity— nevertop/left/width/height/margin/filter(layout thrash = jank). - Text reveals: line-level splits (
overflow: hiddenwrapper +yPercent: 110→ 0) by default. Character-level only for hero headlines, and only inside the desktop gate. - No
will-changespam — set it on the animated element's wrapper while animating, remove after (or let GSAP manage it). Everywill-changeis a memory promise. - Keep 60fps honesty: no 200-element stagger in one frame, no scrubbing 40 DOM properties. Batch with
gsap.utils.toArrayand stagger — one tween, many targets, cheap.
4. REVEAL PATTERNS (The Professional's Defaults)
- From-states stay in code, not CSS: elements start visible in CSS;
gsap.from(...)withimmediateRender: trueinside the matchMedia gate hides them only when JS + motion are active. If GSAP never loads, the page is complete — this is the safety contract. - Standard reveal:
opacity: 0, y: 40, duration: 0.9, ease: "power3.out", triggertop 82%,once: truefor content sections. - Hero intro: a
gsap.timeline()on load — 80–120ms stagger between elements,ease: "expo.out"orpower4.out, total under 1.4s. The page is a story with a first line, not a slideshow. - Count-ups: tween a proxy object (
gsap.to(obj, { v: target })), writeel.textContentinonUpdate,snapoptional.once: trueon the trigger.
5. THE FULL STACK OF SINS (Each Is a Fail)
- Scroll-jacking the wheel without a smooth-scroll layer (Lenis) and then not testing it — native scroll is a feature.
- Animations that trigger before the content exists (missing
ScrollTrigger.refresh()). - Infinite marquees that aren't paused under reduced motion — kill them in CSS with
@media (prefers-reduced-motion: reduce)too, not just in JS. - Autoplaying anything: hero video, accordions, carousels that move without input. Awwwards confidence is stillness between moments.
- A page whose "wow" depends on animation: if the still screenshot is boring, the animation is makeup, not design.
6. CHECKLIST (Fail the Animation If…)
- No
gsap.context+matchMediagating (reduced-motion users see animation). - More than two pinned sections, or a pin under 768px.
- Any animated layout property (
top/left/width/height). - No
ScrollTrigger.refresh()after fonts/images. - Per-character splits outside the desktop gate.
- Marquee or autoplay without a reduced-motion kill switch.
- The still frame (no JS) isn't a complete, beautiful page.
- Any animation that exists for its own sake — every move serves the story or dies.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

