CSS Scroll-Driven Animations with ScrollTimeline, ViewTimeline, parallax effects, and progressive enhancement for performant scroll effects. Use when implementing scroll-linked animations or parallax.
View on GitHubyonatangross/skillforge-claude-plugin
orchestkit-complete
January 23, 2026
Select agents to install to:
npx add-skill https://github.com/yonatangross/skillforge-claude-plugin/blob/main/./skills/scroll-driven-animations/SKILL.md -a claude-code --skill scroll-driven-animationsInstallation paths:
.claude/skills/scroll-driven-animations/# Scroll-Driven Animations
CSS Scroll-Driven Animations API provides performant, declarative scroll-linked animations without JavaScript. Supported in Chrome 115+, Edge 115+, Safari 18.4+.
## Overview
- Progress indicators tied to scroll position
- Parallax effects without JavaScript jank
- Element reveal animations on scroll into view
- Sticky header animations based on scroll
- Reading progress bars
- Scroll-triggered image/content reveals
## Core Concepts
### Timeline Types
| Timeline | CSS Function | Use Case |
|----------|--------------|----------|
| **Scroll Progress** | `scroll()` | Tied to scroll container position (0-100%) |
| **View Progress** | `view()` | Tied to element visibility in viewport |
## CSS Patterns
### 1. Scroll Progress Timeline (Reading Progress)
```css
/* Progress bar that fills as page scrolls */
.progress-bar {
position: fixed;
top: 0;
left: 0;
height: 4px;
background: var(--color-primary);
transform-origin: left;
/* Animate based on root scroll */
animation: grow-progress linear;
animation-timeline: scroll(root block);
}
@keyframes grow-progress {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
```
### 2. View Timeline (Reveal on Scroll)
```css
/* Fade in when element enters viewport */
.reveal-on-scroll {
animation: fade-slide-up linear both;
animation-timeline: view();
animation-range: entry 0% entry 100%;
}
@keyframes fade-slide-up {
from {
opacity: 0;
transform: translateY(50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
```
### 3. Animation Range Control
```css
/* Fine-tune when animation runs */
.card {
animation: scale-up linear both;
animation-timeline: view();
/* Start at 25% entry, complete at 75% entry */
animation-range: entry 25% entry 75%;
}
/* Full visibility animation */
.hero-image {
animation: parallax linear both;
animation-timeline: view();
/* Animate through entire visibility */
animation-range: cover 0% cover