dinaf2026-web/awesome-web-skills/web-scrollytelling

Claude Code and agent skill by dinaf2026-web/awesome-web-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Scroll-driven narrative design for modern websites — sticky sections, progress-tied animations, pinned panels, horizontal scroll, and immersive storytelling sequences using GSAP ScrollTrigger and Framer Motion.

Install

npx vskill@latest install dinaf2026-web/awesome-web-skills/web-scrollytelling

SKILL.md

The same SKILL.md was published earlier as dinaf2026-web/awesome-web-skills/web-scrollytelling.

web-scrollytelling

Scroll-driven narrative design for modern websites. This skill covers the full implementation stack: sticky sections, progress-tied animations, pinned panels, horizontal scroll, and immersive storytelling using GSAP ScrollTrigger and Framer Motion.


1. When to Use Scrollytelling

Use it when
  • You need to guide users through a multi-step story or product reveal
  • Data visualization benefits from progressive disclosure (charts that build as you scroll)
  • Brand narratives require cinematic pacing (hero journeys, feature walkthroughs)
  • You have a dedicated landing page where scroll position IS the primary interaction
Do NOT use it when
  • Your content is utility-first (dashboards, forms, documentation, e-commerce listings)
  • Your audience is predominantly mobile-only with intermittent connectivity
  • The animation adds no semantic value — decoration for decoration's sake
  • You cannot afford the JS bundle cost (sub-80kb budget pages)
  • Your team lacks the bandwidth to maintain reduced-motion fallbacks
The cost calculus
FactorImpact
GSAP + ScrollTrigger~27kb gzipped
Framer Motion~47kb gzipped
R3F (Three.js)~160kb gzipped
ScrollTrigger scroll listenersThrottled to rAF — safe
Pinned elementsForces compositor layers — watch GPU RAM

2. The Three Scrollytelling Patterns

Pattern 1 — Pin + Scrub

The viewport locks to a section. As the user scrolls, an animation scrubs forward proportional to scroll distance. The page "unfreezes" when the animation completes.

Best for: Product reveals, data builds, step-by-step explanations

Pattern 2 — Step-Based (Waypoint)

No pinning. Discrete scroll waypoints trigger state changes. The page scrolls normally; entering/leaving a viewport threshold fires events.

Best for: Long-form journalism, chapter transitions, annotation sequences

Pattern 3 — Progress-Tied

A scroll value (0–1) drives a CSS variable or animation value continuously. No pinning, no steps — smooth and reactive.

Best for: Parallax headers, progress bars, continuous visual feedback


3. Pinned Panel Sequence

Text and visual content change as the user scrolls through a pinned section. The panel stays fixed while a timeline of content plays.

tsx
// PinnedSequence.tsx
'use client'
import { useEffect, useRef } from 'react'
import gsap from 'gsap'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
gsap.registerPlugin(ScrollTrigger)
interface Step {
heading: string
body: string
accent: string
}
const STEPS: Step[] = [
{ heading: 'Step One', body: 'The problem emerges from decades of neglect.', accent: '#3b82f6' },
{ heading: 'Step Two', body: 'We mapped every affected node in the network.', accent: '#8b5cf6' },
{ heading: 'Step Three', body: 'A single intervention point changes everything.', accent: '#10b981' },
{ heading: 'Step Four', body: 'Results compound across the entire system.', accent: '#f59e0b' },
]
export function PinnedSequence() {
const wrapperRef = useRef<HTMLDivElement>(null)
const panelRef = useRef<HTMLDivElement>(null)
const headingRef = useRef<HTMLHeadingElement>(null)
const bodyRef = useRef<HTMLParagraphElement>(null)
const accentRef = useRef<HTMLDivElement>(null)
useEffect(() => {
const ctx = gsap.context(() => {
const tl = gsap.timeline({
scrollTrigger: {
trigger: wrapperRef.current,
start: 'top top',
end: `+=${STEPS.length * 100}%`,
scrub: 1,
pin: panelRef.current,
anticipatePin: 1,
},
})
STEPS.forEach((step, i) => {
if (i === 0) return // first step is the initial state
const label = `step${i}`
tl.addLabel(label, i - 1)
tl.to(
headingRef.current,
{ opacity: 0, y: -20, duration: 0.3 },
label,
)
tl.to(
bodyRef.current,
{ opacity: 0, y: -10, duration: 0.3 },
label,
)
tl.call(
() => {
if (headingRef.current) headingRef.current.textContent = step.heading
if (bodyRef.current) bodyRef.current.textContent = step.body
},
undefined,
`${label}+=0.3`,
)
tl.to(
headingRef.current,
{ opacity: 1, y: 0, duration: 0.3 },
`${label}+=0.3`,
)
tl.to(
bodyRef.current,
{ opacity: 1, y: 0, duration: 0.3 },
`${label}+=0.3`,
)
tl.to(
accentRef.current,
{ backgroundColor: step.accent, duration: 0.5 },
label,
)
})
}, wrapperRef)
return () => ctx.revert()
}, [])
return (
// Height determines how long the pin lasts
<div ref={wrapperRef} style={{ height: `${STEPS.length * 100}vh` }}>
<div
ref={panelRef}
className="flex h-screen items-center justify-center bg-gray-950"
>
<div
ref={accentRef}
className="absolute inset-0 opacity-5 transition-colors"
style={{ backgroundColor: STEPS[0].accent }}
/>
<div className="relative z-10 max-w-2xl px-8 text-center">
<h2
ref={headingRef}
className="mb-6 text-5xl font-bold text-white"
>
{STEPS[0].heading}
</h2>
<p
ref={bodyRef}
className="text-xl leading-relaxed text-gray-300"
>
{STEPS[0].body}
</p>
</div>
</div>
</div>
)
}
Framer Motion step-based variant (no pin, waypoint triggers)
tsx
// StepSequence.tsx — waypoint pattern, no pinning
'use client'
import { useInView } from 'framer-motion'
import { useRef } from 'react'
import { motion } from 'framer-motion'
interface StepCardProps {
heading: string
body: string
index: number
}
function StepCard({ heading, body, index }: StepCardProps) {
const ref = useRef<HTMLDivElement>(null)
const isInView = useInView(ref, { margin: '-40% 0px -40% 0px', once: false })
return (
<div ref={ref} className="flex min-h-[60vh] items-center py-24">
<motion.div
animate={{
opacity: isInView ? 1 : 0.2,
x: isInView ? 0 : -32,
}}
transition={{ duration: 0.5, ease: [0.16, 1, 0.3, 1] }}
className="max-w-xl"
>
<span className="mb-4 block text-sm font-mono text-blue-400">
{String(index + 1).padStart(2, '0')}
</span>
<h3 className="mb-4 text-4xl font-bold text-white">{heading}</h3>
<p className="text-lg text-gray-400">{body}</p>
</motion.div>
</div>
)
}

4. Horizontal Scroll Section

A section that scrolls horizontally while the page scrolls vertically. GSAP translates a wide container leftward as scroll progresses.

tsx
// HorizontalScroll.tsx
'use client'
import { useEffect, useRef } from 'react'
import gsap from 'gsap'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
gsap.registerPlugin(ScrollTrigger)
interface Panel {
id: string
label: string
bg: string
}
const PANELS: Panel[] = [
{ id: 'a', label: 'Chapter One', bg: 'bg-blue-950' },
{ id: 'b', label: 'Chapter Two', bg: 'bg-violet-950' },
{ id: 'c', label: 'Chapter Three', bg: 'bg-emerald-950' },
{ id: 'd', label: 'Chapter Four', bg: 'bg-amber-950' },
]
export function HorizontalScroll() {
const sectionRef = useRef<HTMLDivElement>(null)
const trackRef = useRef<HTMLDivElement>(null)
useEffect(() => {
const ctx = gsap.context(() => {
const track = trackRef.current!
const panels = gsap.utils.toArray<HTMLElement>('.h-panel')
gsap.to(track, {
x: () => -(track.scrollWidth - window.innerWidth),
ease: 'none',
scrollTrigger: {
trigger: sectionRef.current,
start: 'top top',
end: () => `+=${track.scrollWidth - window.innerWidth}`,
scrub: 1,
pin: true,
anticipatePin: 1,
invalidateOnRefresh: true,
},
})
}, sectionRef)
return () => ctx.revert()
}, [])
return (
<section ref={sectionRef} className="overflow-hidden">
<div
ref={trackRef}
className="flex will-change-transform"
style={{ width: `${PANELS.length * 100}vw` }}
>
{PANELS.map((panel) => (
<div
key={panel.id}
className={`h-panel flex h-screen w-screen shrink-0 items-center justify-center ${panel.bg}`}
>
<h2 className="text-6xl font-bold text-white">{panel.label}</h2>
</div>
))}
</div>
</section>
)
}
Framer Motion horizontal scroll (useScroll + useTransform)
tsx
// HorizontalScrollFM.tsx
'use client'
import { useRef } from 'react'
import { motion, useScroll, useTransform } from 'framer-motion'
const PANELS = ['Prologue', 'Act I', 'Act II', 'Epilogue']
export function HorizontalScrollFM() {
const containerRef = useRef<HTMLDivElement>(null)
const { scrollYProgress } = useScroll({
target: containerRef,
offset: ['start start', 'end end'],
})
// scrollYProgress 0->1 maps to translateX 0 -> -(n-1)*100vw
const x = useTransform(
scrollYProgress,
[0, 1],
['0vw', `-${(PANELS.length - 1) * 100}vw`],
)
return (
// height creates the vertical scroll space
<div ref={containerRef} style={{ height: `${PANELS.length * 100}vh` }}>
<div className="sticky top-0 h-screen overflow-hidden">
<motion.div className="flex h-full" style={{ x }}>
{PANELS.map((label, i) => (
<div
key={i}
className="flex h-full w-screen shrink-0 items-center justify-center bg-gray-900"
>
<h2 className="text-5xl font-bold text-white">{label}</h2>
</div>
))}
</motion.div>
</div>
</div>
)
}

5. Progress Bar + Section Navigation

Scroll progress indicator with jump-link navigation. The bar fills as the user scrolls. Clicking a link smoothly scrolls to a section.

tsx
// ScrollProgress.tsx
'use client'
import { useEffect, useRef, useState } from 'react'
import { motion, useScroll, useSpring } from 'framer-motion'
interface Section {
id: string
label: string
}
const SECTIONS: Section[] = [
{ id: 'intro', label: 'Intro' },
{ id: 'problem', label: 'Problem' },
{ id: 'solution', label: 'Solution' },
{ id: 'results', label: 'Results' },
]
export function ScrollProgress() {
const { scrollYProgress } = useScroll()
const scaleX = useSpring(scrollYProgress, { stiffness: 400, damping: 40 })
const [active, setActive] = useState<string>('intro')
useEffect(() => {
const observers = SECTIONS.map(({ id }) => {
const el = document.getElementById(id)
if (!el) return null
const observer = new IntersectionObserver(
([entry]) => { if (entry.isIntersecting) setActive(id) },
{ rootMargin: '-50% 0px -50% 0px' },
)
observer.observe(el)
return observer
})
return () => observers.forEach((obs) => obs?.disconnect())
}, [])
function scrollTo(id: string) {
document.getElementById(id)?.scrollIntoView({ behavior: 'smooth' })
}
return (
<>
{/* Progress bar — fixed top */}
<motion.div
className="fixed left-0 top-0 z-50 h-1 w-full origin-left bg-blue-500"
style={{ scaleX }}
/>

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Refreshed 18 Nov 2026, 13 days ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dinaf2026-web/awesome-web-skills/web-scrollytelling/badge)](https://verified-skill.com/skills/dinaf2026-web/awesome-web-skills/web-scrollytelling)

Something wrong with this skill or its page? Tell us.