creative-web-motion
/creative-web-motion
GSAP + React/Next.js scroll and interaction motion — pinned step stories, horizontal tracks, stacking cards, SplitText and ScrambleText reveals, Flip morphs, Draggable carousels, SVG drawing, image-sequence scrub, magnetic buttons and the driver-object bridge to WebGL. 34 patterns, each with a reduced-motion fallback. Use when the user asks to animate a section, add scroll effects, pin or scrub content, make a page "more animated", or connect scroll to a three.js scene. Do NOT use for choosing a 3D scene (use creative-web-webgl) or deciding a widget's content (use creative-web-widgets).
- Author
- AfkanOzdemir ↗
- Repository
- creative-web-skills ↗
- Licence
- MIT
- Last repository change
- 05.11.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
GSAP + React/Next.js scroll and interaction motion — pinned step stories, horizontal tracks, stacking cards, SplitText and ScrambleText reveals, Flip morphs, Draggable carousels, SVG drawing, image-sequence scrub, magnetic buttons and the driver-object bridge to WebGL. 34 patterns, each with a reduced-motion fallback. Use when the user asks to animate a section, add scroll effects, pin or scrub content, make a page "more animated", or connect scroll to a three.js scene. Do NOT use for choosing a 3D scene (use creative-web-webgl) or deciding a widget's content (use creative-web-widgets).
Triggers from the description
Original author description
GSAP + React/Next.js scroll and interaction motion — pinned step stories, horizontal tracks, stacking cards, SplitText and ScrambleText reveals, Flip morphs, Draggable carousels, SVG drawing, image-sequence scrub, magnetic buttons and the driver-object bridge to WebGL. 34 patterns, each with a reduced-motion fallback. Use when the user asks to animate a section, add scroll effects, pin or scrub content, make a page "more animated", or connect scroll to a three.js scene. Do NOT use for choosing a 3D scene (use creative-web-webgl) or deciding a widget's content (use creative-web-widgets).
How it works
- Critical
- Setup (once per module)
- The driver object (GSAP → WebGL bridge)
- Pinned N-step story (the core recipe)
- Rules of thumb
- Troubleshooting
- Workflow
- Examples
SKILL.md preview
---
name: creative-web-motion
description: GSAP + React/Next.js scroll and interaction motion — pinned step stories, horizontal tracks, stacking cards, SplitText and ScrambleText reveals, Flip morphs, Draggable carousels, SVG drawing, image-sequence scrub, magnetic buttons and the driver-object bridge to WebGL. 34 patterns, each with a reduced-motion fallback. Use when the user asks to animate a section, add scroll effects, pin or scrub content, make a page "more animated", or connect scroll to a three.js scene. Do NOT use for choosing a 3D scene (use creative-web-webgl) or deciding a widget's content (use creative-web-widgets).
license: MIT
compatibility: Works in Claude Code, Codex, Cursor, OpenCode and claude.ai. Requires gsap 3.13+ and @gsap/react in a React 18+ or Next.js project.
metadata:
author: afkanozdemir
version: 1.0.1
suite: creative-web
tags: [frontend, design, motion]
---
# Motion storytelling (GSAP + React)
Builds on the official GSAP skills (`gsap-react`, `gsap-scrolltrigger`, `gsap-plugins`). All GSAP plugins
(SplitText, ScrambleText, MorphSVG, DrawSVG, Inertia…) ship free in the public `gsap` package.
## Critical
- Create every tween inside `useGSAP` + `gsap.matchMedia()` and return cleanup; nothing animates outside a context.
- Always add the `(prefers-reduced-motion: reduce)` branch that sets the final state.
- Animate transform, not opacity, for text that must stay readable mid-animation (contrast audits fail on half-faded text). If fading is unavoidable, floor opacity at 0.45.
- SplitText on non-heading elements uses `aria: 'none'`.
- Maximum one scrubbed or pinned "wow" per screenful.
- `references/patterns.md` — 33 patterns, each with when-to-use, code and reduced-motion fallback.
- `references/easing-and-timing.md` — durations, eases per motion personality, stagger and scrub values.
## Setup (once per module)
```tsx
'use client'
import gsap from 'gsap'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
import { SplitText } from 'gsap/SplitText'
import { useGSAP } from '@gsap/react'
gsap.registerPlugin(ScrollTrigger, SplitText, useGSAP)
export const MOTION = '(prefers-reduced-motion: no-preference)'
```
Skeleton every pattern uses:
```tsx
useGSAP(() => {
const mm = gsap.matchMedia()
mm.add(MOTION, () => { /* tweens, triggers, listeners; return cleanup */ })
mm.add('(prefers-reduced-motion: reduce)', () => { /* set final state */ })
return () => mm.revert()
}, { scope: root })
```
## The driver object (GSAP → WebGL bridge)
A plain mutable object created once, passed to a scene as a prop. GSAP tweens it; the scene's frame loop
eases toward it.
```tsx
const [driver] = useState(() => ({ progress: 0, px: 0, py: 0 }))
tl.to(driver, { progress: i + 1, duration: 0.8, ease: 'power1.inOut' }, at)
// scene: u.value += (driver.progress - u.value) * 0.08
```
- Keep progress in step units (0..N) so shaders do `clamp(uP - k, 0, 1)` per phase.
- `react-hooks/immutability` lint flags mutating state objects in handlers → mutate inside the matchMedia
callback or use `gsap.set(driver, {...})`.
## Pinned N-step story (the core recipe)
```tsx
gsap.set(steps, { autoAlpha: 0, y: 50, filter: 'blur(10px)' })
gsap.set(bars, { scaleX: 0, transformOrigin: 'left center' })
const tl = gsap.timeline({ scrollTrigger: { trigger: root.current, start: 'top top', end: '+=420%', pin: true, scrub: 1 } })
tl.to('[data-intro]', { autoAlpha: 0, y: -40, scale: 0.94, duration: 0.5, ease: 'power2.in' }, 0)
steps.forEach((s, i) => {
const at = 0.5 + i * 1.1
tl.to(driver, { progress: i + 1, duration: 0.8, ease: 'power1.inOut' }, at - 0.2)
.to(s, { autoAlpha: 1, y: 0, filter: 'blur(0px)', duration: 0.35, ease: 'power2.out' }, at)
.to(bars[i], { scaleX: 1, duration: 1, ease: 'none' }, at)
if (i < steps.length - 1) tl.to(s, { autoAlpha: 0, y: -50, filter: 'blur(10px)', duration: 0.3, ease: 'power2.in' }, at + 0.8)
})
tl.to({}, { duration: 0.4 })
```
Steps share one grid cell (`col-start-1 row-start-1`), start `invisible`, are `aria-hidden`; a separate
`sr-only` list becomes visible under `motion-reduce:` so content is never lost.
## Rules of thumb
- One scrubbed "wow" per screenful; follow a pinned section with a static or trigger-once one.
- Animate **transform**, not opacity, for text that must stay legible mid-animation (contrast audits fail
on half-faded text). If you must fade, start at ≥0.45 opacity.
- SplitText on non-heading text: `aria: 'none'` (an `aria-label` on `<p>` is prohibited).
- Masks clip descenders/diacritics → `leading-[1.08] pb-[0.04em]` on masked titles.
- If split text can change, `key={text}` so React remounts before splitting.
- Pin-dependent triggers (e.g. header colour) must be created after the pin and target the pin-spacer.
- Only create tweens inside `useGSAP` / `mm.add` / `contextSafe` so they revert on unmount.
## Troubleshooting
| Symptom | Fix |
|---|---|
| Text flashes then vanishes | `immediateRender: false` on later `fromTo` |
| Header toggle ends early | trigger = pin-spacer, created after pin |
| Split title stale | `key={title}` |
| Descenders cut | leading/padding |
| Horizontal track jumps on resize | `x: () => -dist()`, `end: () => '+=' + dist()`, `invalidateOnRefresh: true` |
| Leaks after route change | everything inside matchMedia + return cleanup |
## Workflow
1. Write the section's micro-story in one sentence ("the step text swaps while the scene advances").
2. Read the dealt world's `## Motion grammar`: its eases, three durations and **signature move** override
the presets. Pick a pattern from `references/patterns.md` that fits that grammar; use
`references/easing-and-timing.md` only where the world is silent. The signature move appears once
per screen at most; everything else is quieter than it.
3. Make the markup the final state; animate *from* earlier states.
4. Wire triggers: scrub for reader-controlled stories, play-once for punctuation, pin only for showpieces (desktop).
5. Add the reduced-motion branch and a static fallback for pinned content.
6. Verify with `creative-web-qa` (pinned sections at 50% and 97%).
## Examples
**User says:** "Explain our four steps with a scroll animation like Apple does."
**Actions:** pinned N-step story (pattern 1) → driver object feeds a scene → segmented progress bar → `sr-only` list for reduced motion.
**Result:** a pinned section where each scroll beat swaps the step and advances the visual; content stays accessible.
**User says:** "These five principle cards are boring."
**Actions:** horizontal track with `containerAnimation` (pattern 2) → numbers rise per card → mobile falls back to a vertical stack with batch reveals.
**Result:** a sideways-scrolling track on desktop, a clean stacked list on mobile.
Files in this package (3)
- SKILL.md 7 KB
- references/easing-and-timing.md 2 KB
- references/patterns.md 18 KB
Versions
The database has no other skills named creative-web-motion.
Database snapshot: 13.11.2026 · package version 8e72c65eaf37 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90gsap
GSAP motion by astudio: timelines, ScrollTrigger scroll storytelling (pin, scrub, horizontal galleries, parallax), SplitText headline reveals, Flip layout transitions, MorphSVG/DrawSVG/MotionPath, Draggable/Inertia/Observer, CustomEase, quickTo cursor followers, Lenis smooth… - 100gsap-plugins
Official GSAP skill for GSAP plugins — registration, ScrollToPlugin, ScrollSmoother, Flip, Draggable, Inertia, Observer, SplitText, ScrambleText, SVG and physics plugins, CustomEase, EasePack, CustomWiggle, CustomBounce, GSDevTools. Use when the user asks about a GSAP plugin,… - 100creative-web-widgets
48 animated product widgets (one-idea UI micro-stories) for marketing and product pages — AI chat with citations, search palettes, status timelines, sessions and permissions, privacy controls, collaboration, media, onboarding and settings. Each has React + Tailwind markup, a… - 100gsap-creative-engineering
Design, audit, implement, and visually validate distinctive, production-grade GSAP experiences for modern React and Next.js websites. Use for scroll storytelling, pinned scenes, horizontal galleries, vertical card stacks, 3D previews, kinetic typography, SVG motion, transitions,… - 100scroll-animation
Build scroll-driven animations with GSAP, ScrollTrigger, SplitText and Lenis smooth scroll — reveals, pinned sections, horizontal scroll, parallax, scrubbed timelines, text effects — in vanilla JS, React, Next.js, Vue/Nuxt, or Astro, with correct setup, cleanup and responsive… - 100gsap-web
This skill should be used when the user asks to "build a scroll animation", "add ScrollTrigger", "pin a section while scrolling", "scrub an animation to scroll", "create a hero timeline", "do a horizontal scroll section", "split text and animate words", "animate a layout change…