scroll-experience について
scroll-experienceは、デザイナーや開発者向けの、スクロールを軸にしたウェブ体験の設計スキルです。物語の構成やアニメーション、固定セクションに加え、使いやすさと性能上の注意点も扱います。
主な機能
- 01スクロール連動アニメーションのパターン
- 02パララックス演出の指針
- 03インタラクティブな物語構成
- 04固定セクションと横スクロール
- 05アクセシビリティと性能への配慮
活用シーン
- 01製品機能紹介の構成
- 02ビフォーアフター比較の設計
- 03スクロール型ストーリーの構成
- 04ランディングページへの表示演出
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ liuchiawei/ agent-skills --skill scroll-experienceインストール後、Claude Code で/scroll-experienceを入力して読み込まれたか確認します。
詳細
スクロール体験
役割: スクロール体験アーキテクト
あなたはスクロールを、単なるナビゲーションではなく物語を語る仕掛けとして捉えています。ユーザーがスクロールする際に、驚きと喜びの瞬間を生み出します。控えめなアニメーションを使うべき場面と、映画的な演出に踏み切るべき場面を見極めます。パフォーマンスと視覚的なインパクトのバランスを取ります。親指один操作で、自分が操作できる映画のように感じられるウェブサイトを作ります。
機能
- スクロール連動アニメーション
- パララックスによるストーリーテリング
- インタラクティブなナラティブ
- シネマティックなウェブ体験
- スクロールをトリガーとした要素の出現
- 進捗インジケーター
- スティッキーセクション
- スクロールスナップ
パターン
スクロールアニメーションのスタック
スクロールアニメーションのためのツールと手法
使用するタイミング: スクロール連動の体験を企画するとき
## Scroll Animation Stack
### Library Options
| Library | Best For | Learning Curve |
|---------|----------|----------------|
| GSAP ScrollTrigger | Complex animations | Medium |
| Framer Motion | React projects | Low |
| Locomotive Scroll | Smooth scroll + parallax | Medium |
| Lenis | Smooth scroll only | Low |
| CSS scroll-timeline | Simple, native | Low |
### GSAP ScrollTrigger Setup
```javascript
import { gsap } from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
gsap.registerPlugin(ScrollTrigger);
// Basic scroll animation
gsap.to('.element', {
scrollTrigger: {
trigger: '.element',
start: 'top center',
end: 'bottom center',
scrub: true, // Links animation to scroll position
},
y: -100,
opacity: 1,
});
Framer Motion でのスクロール
import { motion, useScroll, useTransform } from 'framer-motion';
function ParallaxSection() {
const { scrollYProgress } = useScroll();
const y = useTransform(scrollYProgress, [0, 1], [0, -200]);
return (
<motion.div style={{ y }}>
Content moves with scroll
</motion.div>
);
}
CSS ネイティブ (2024+)
@keyframes reveal {
from { opacity: 0; transform: translateY(50px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-on-scroll {
animation: reveal linear;
animation-timeline: view();
animation-range: entry 0% cover 40%;
}
### Parallax Storytelling
Tell stories through scroll depth
**When to use**: When creating narrative experiences
```javascript
## Parallax Storytelling
### Layer Speeds
| Layer | Speed | Effect |
|-------|-------|--------|
| Background | 0.2x | Far away, slow |
| Midground | 0.5x | Middle depth |
| Foreground | 1.0x | Normal scroll |
| Content | 1.0x | Readable |
| Floating elements | 1.2x | Pop forward |
### Creating Depth
```javascript
// GSAP parallax layers
gsap.to('.background', {
scrollTrigger: {
scrub: true
},
y: '-20%', // Moves slower
});
gsap.to('.foreground', {
scrollTrigger: {
scrub: true
},
y: '-50%', // Moves faster
});
ストーリーのビート
Section 1: Hook (full viewport, striking visual)
↓ scroll
Section 2: Context (text + supporting visuals)
↓ scroll
Section 3: Journey (parallax storytelling)
↓ scroll
Section 4: Climax (dramatic reveal)
↓ scroll
Section 5: Resolution (CTA or conclusion)
テキストの出現演出
- スクロールに合わせてフェードイン
- トリガーに合わせたタイプライター効果
- 単語ごとのハイライト
- 表示内容が変わるスティッキーテキスト
### Sticky Sections
Pin elements while scrolling through content
**When to use**: When content should stay visible during scroll
```javascript
## Sticky Sections
### CSS Sticky
```css
.sticky-container {
height: 300vh; /* Space for scrolling */
}
.sticky-element {
position: sticky;
top: 0;
height: 100vh;
}
GSAP のピン留め
gsap.to('.content', {
scrollTrigger: {
trigger: '.section',
pin: true, // Pins the section
start: 'top top',
end: '+=1000', // Pin for 1000px of scroll
scrub: true,
},
// Animate while pinned
x: '-100vw',
});
横スクロールセクション
const sections = gsap.utils.toArray('.panel');
gsap.to(sections, {
xPercent: -100 * (sections.length - 1),
ease: 'none',
scrollTrigger: {
trigger: '.horizontal-container',
pin: true,
scrub: 1,
end: () => '+=' + document.querySelector('.horizontal-container').offsetWidth,
},
});
ユースケース
- 製品機能のウォークスルー
- ビフォー/アフターの比較
- ステップ形式のプロセス
- 画像ギャラリー
## Anti-Patterns
### ❌ Scroll Hijacking
**Why bad**: Users hate losing scroll control.
Accessibility nightmare.
Breaks back button expectations.
Frustrating on mobile.
**Instead**: Enhance scroll, don't replace it.
Keep natural scroll speed.
Use scrub animations.
Allow users to scroll normally.
### ❌ Animation Overload
**Why bad**: Distracting, not delightful.
Performance tanks.
Content becomes secondary.
User fatigue.
**Instead**: Less is more.
Animate key moments.
Static content is okay.
Guide attention, don't overwhelm.
### ❌ Desktop-Only Experience
**Why bad**: Mobile is majority of traffic.
Touch scroll is different.
Performance issues on phones.
Unusable experience.
**Instead**: Mobile-first scroll design.
Simpler effects on mobile.
Test on real devices.
Graceful degradation.
## ⚠️ Sharp Edges
| Issue | Severity | Solution |
|-------|----------|----------|
| Animations stutter during scroll | high | ## Fixing Scroll Jank |
| Parallax breaks on mobile devices | high | ## Mobile-Safe Parallax |
| Scroll experience is inaccessible | medium | ## Accessible Scroll Experiences |
| Critical content hidden below animations | medium | ## Content-First Scroll Design |
## Related Skills
Works well with: `3d-web-experience`, `frontend`, `ui-design`, `landing-page-design`
コメント
Markdown 対応