scroll-reveal-animation
4
总安装量
4
周安装量
#51716
全站排名
安装命令
npx skills add https://github.com/ethandiedericks/scroll-reveal-animation --skill scroll-reveal-animation
Agent 安装分布
opencode
4
gemini-cli
4
github-copilot
4
codex
4
amp
4
kimi-cli
4
Skill 文档
Smooth Scroll Animations
Reusable Framer Motion animation components for smooth scroll-triggered reveals in React/Next.js.
Requirements
framer-motionmust be installed. React 18+, designed for Next.js App Router and React projects using TypeScript.
Workflow
- Add the animations file â Copy
assets/animations.tsxinto the project atcomponents/animations.tsx(orlib/animations.tsx). Add"use client"to any file importing these components in Next.js App Router. - Import and use â Import
AnimatedSection,AnimatedChildren,AnimatedItem, and/orAnimatedTextand wrap UI elements following the patterns below.
Usage Patterns
Staggered card grid â AnimatedChildren + AnimatedItem for cascading reveals:
<AnimatedSection>
<AnimatedChildren className="grid grid-cols-3 gap-6">
{items.map((item) => (
<AnimatedItem key={item.id}><Card {...item} /></AnimatedItem>
))}
</AnimatedChildren>
</AnimatedSection>
Section with heading + content â heading reveals, then content staggers in:
<AnimatedSection>
<AnimatedChildren className="mb-12 text-center">
<AnimatedText as="h2" className="text-4xl">Section Title</AnimatedText>
<AnimatedText as="p" className="text-lg text-muted-foreground">
Subtitle text here.
</AnimatedText>
</AnimatedChildren>
<AnimatedChildren className="grid grid-cols-2 gap-8">
<AnimatedItem>Content 1</AnimatedItem>
<AnimatedItem>Content 2</AnimatedItem>
</AnimatedChildren>
</AnimatedSection>
List with staggered items â use as="ul" on container and as="li" on items:
<AnimatedChildren as="ul" className="space-y-4">
<AnimatedItem as="li">First item</AnimatedItem>
<AnimatedItem as="li">Second item</AnimatedItem>
</AnimatedChildren>
Notes
- All animations trigger once and start slightly before the element enters the viewport.
- For detailed animation values, props, and customization options, see
references/REFERENCE.md.