scroll-animations
БесплатноБез исполняемых скриптовНе проверенExpert knowledge for scroll-triggered animations, parallax effects, and scroll-linked interactions that create immersive storytelling experiences.
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Scroll Animations Skill
Expert knowledge for scroll-triggered animations, parallax effects, and scroll-linked interactions that create immersive storytelling experiences.
When to Use
Activate this skill when:
- User wants animations triggered by scrolling
- Building parallax scrolling effects
- Creating scroll-linked progress indicators
- Implementing reveal-on-scroll patterns
- Building horizontal scroll sections
- Need scroll-based storytelling
File Patterns
**/*.tsxwith scroll-related hooks**/hooks/useScroll*.ts- Files with
ScrollTriggerimports - Files with
useScroll,useInViewfrom framer-motion - Intersection Observer usage
Scroll Animation Libraries
Framer Motion Scroll
import { motion, useScroll, useTransform, useInView } from 'framer-motion';
GSAP ScrollTrigger
import gsap from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
gsap.registerPlugin(ScrollTrigger);
Intersection Observer (Native)
const observer = new IntersectionObserver(callback, options);
Framer Motion Patterns
Basic Scroll Progress
import { motion, useScroll, useTransform } from 'framer-motion';
function ScrollProgress() {
const { scrollYProgress } = useScroll();
return (
<motion.div
className="fixed top-0 left-0 h-1 bg-blue-500 origin-left"
style={{ scaleX: scrollYProgress }}
/>
);
}
Parallax Effect
function Parallax() {
const { scrollY } = useScroll();
// Background moves slower than foreground
const backgroundY = useTransform(scrollY, [0, 1000], [0, -200]);
const foregroundY = useTransform(scrollY, [0, 1000], [0, -400]);
return (
<div className="relative h-screen overflow-hidden">
<motion.div
className="absolute inset-0 bg-cover bg-center"
style={{ y: backgroundY, backgroundImage: 'url(bg.jpg)' }}
/>
<motion.div
className="relative z-10"
style={{ y: foregroundY }}
>
<h1>Foreground Content</h1>
</motion.div>
</div>
);
}
Element-Linked Scroll
function ElementParallax() {
const ref = useRef(null);
const { scrollYProgress } = useScroll({
target: ref,
offset: ['start end', 'end start'], // When to start/end tracking
});
const opacity = useTransform(scrollYProgress, [0, 0.5, 1], [0, 1, 0]);
const y = useTransform(scrollYProgress, [0, 1], [100, -100]);
return (
<motion.div
ref={ref}
style={{ opacity, y }}
className="h-screen flex items-center justify-center"
>
Content that fades and moves with scroll
</motion.div>
);
}
useInView for Reveal
import { motion, useInView } from 'framer-motion';
function RevealOnScroll({ children }: { children: React.ReactNode }) {
const ref = useRef(null);
const isInView = useInView(ref, {
once: true, // Only trigger once
margin: '-100px', // Trigger 100px before entering viewport
});
return (
<motion.div
ref={ref}
initial={{ opacity: 0, y: 50 }}
animate={isInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.5, ease: 'easeOut' }}
>
{children}
</motion.div>
);
}
GSAP ScrollTrigger Patterns
Basic Scroll-Triggered Animation
import { useGSAP } from '@gsap/react';
import gsap from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
gsap.registerPlugin(ScrollTrigger);
function Component() {
const containerRef = useRef(null);
useGSAP(() => {
gsap.from('.reveal-item', {
y: 100,
opacity: 0,
duration: 1,
stagger: 0.2,
scrollTrigger: {
trigger: '.reveal-container',
start: 'top 80%',
end: 'bottom 20%',
toggleActions: 'play none none reverse',
// markers: true, // Debug
},
});
}, { scope: containerRef });
return (
<div ref={containerRef}>
<div className="reveal-container">
<div className="reveal-item">Item 1</div>
<div className="reveal-item">Item 2</div>
<div className="reveal-item">Item 3</div>
</div>
</div>
);
}
Scrub Animation (Linked to Scroll Position)
useGSAP(() => {
gsap.to('.progress-bar', {
scaleX: 1,
ease: 'none',
scrollTrigger: {
trigger: '.content',
start: 'top top',
end: 'bottom bottom',
scrub: true, // Links animation to scroll position
},
});
});
Pin Section (Sticky Animation)
useGSAP(() => {
const tl = gsap.timeline({
scrollTrigger: {
trigger: '.pin-section',
start: 'top top',
end: '+=300%', // 3x viewport height of scrolling
pin: true,
scrub: 1,
},
});
tl.to('.step-1', { opacity: 0 })
.to('.step-2', { opacity: 1 })
.to('.step-2', { opacity: 0 })
.to('.step-3', { opacity: 1 });
});
Horizontal Scroll Section
Установить scroll-animations в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл scroll-animations?
Expert knowledge for scroll-triggered animations, parallax effects, and scroll-linked interactions that create immersive storytelling experiences.
Как установить скилл scroll-animations?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scroll-animations запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic