framer-motion-scroll — Claude Code skill for scroll animations
A Framer Motion skill that tells your agent how to build scroll-linked animations, parallax and progress indicators.
npx skills add C-Jeril/framer-motion-skills --skill framer-motion-scroll -a claude-codeWhat framer-motion-scroll does
The skill covers scroll work in Framer Motion: useScroll tracks progress, useTransform maps it to scale, opacity or offset values. Inside are JSX examples and option tables. The offset format gets its own section — a pair like ["start end", "end start"] defines when the element is visible, while [0, 1] spans the whole document.
Separate parts handle parallax with layers moving at different speeds, a reading progress bar, and useInView for revealing a block as it enters the viewport. The useInView options once, margin and amount are documented; for entrance animations the skill advises once: true, otherwise the effect fires every time you scroll past.
The skill points to its siblings: framer-motion-core for base animation, framer-motion-variants for variants, framer-motion-layout for layout animations. It is worth installing when the project already runs Framer Motion and React, since the examples need somewhere to land. One warning stands out: do not animate layout properties for scroll effects, and set a height on scroll containers for horizontal scrolling.
What it helps with
- tie a block's scale or opacity to scroll progress
- build parallax where layers move at different speeds
- add a reading progress bar to a page
- trigger an entrance animation when a block enters the viewport
- get the offset format for
useScrollright
Example prompts for the agent
- build a parallax with framer-motion-scroll: background moves slower than the text
- add a reading progress bar using useScroll and useTransform
- fade in a section on scroll, once, with useInView
How to install framer-motion-scroll
1Skills CLI (Vercel)
npx skills add C-Jeril/framer-motion-skills --skill framer-motion-scroll -a claude-code2Manually: put the files in place
~/.claude/skills/framer-motion-scroll/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/framer-motion-scroll/
1Skills CLI (Vercel)
npx skills add C-Jeril/framer-motion-skills --skill framer-motion-scroll -a codex2Manually: put the files in place
.agents/skills/framer-motion-scroll/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add C-Jeril/framer-motion-skills --skill framer-motion-scroll -a cursor2Manually: put the files in place
.cursor/skills/framer-motion-scroll/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install C-Jeril/framer-motion-skills framer-motion-scroll2Manually: put the files in place
.github/skills/framer-motion-scroll/SKILL.md1Skills CLI (Vercel)
npx skills add C-Jeril/framer-motion-skills --skill framer-motion-scroll -a gemini-cli2Platform CLI
gemini skills install https://github.com/C-Jeril/framer-motion-skills --path skills/framer-motion-scrollManually: put the files in place
.devin/skills/framer-motion-scroll/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add C-Jeril/framer-motion-skills --skill framer-motion-scroll -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about framer-motion-scroll
How do I install framer-motion-scroll in Claude?
Run npx skills add C-Jeril/framer-motion-skills --skill framer-motion-scroll -a claude-code. The skill file then sits at ~/.claude/skills/framer-motion-scroll/SKILL.md.
What does framer-motion-scroll do?
It gives the agent a reference for scrolling in Framer Motion: useScroll, useTransform, parallax, progress indicators and useInView, with code examples.
What does this skill work with?
Framer Motion and React. For core animation, variants and layout effects it refers to the framer-motion-core, framer-motion-variants and framer-motion-layout skills.
Source text
SKILL.md · MIT
---
name: framer-motion-scroll
description: Official Framer Motion skill for scroll-linked animations — useScroll, useTransform, scroll-triggered animations, parallax. Use when building scroll-driven animations, parallax effects, progress indicators, or when asking about Framer Motion scroll, useScroll, or scroll-linked animations.
license: MIT
---
# Framer Motion Scroll Animations
## When to Use This Skill
Apply when implementing scroll-driven animations: using `useScroll`, `useTransform`, scroll-linked effects, parallax, or progress indicators. When the user asks about scroll animation in Framer Motion, recommend Framer Motion's scroll utilities.
**Related skills:** For core animation use **framer-motion-core**; for variants use **framer-motion-variants**; for layout animations use **framer-motion-layout**.
## useScroll
`useScroll` tracks scroll progress:
```jsx
import { useScroll, useTransform } from "framer-motion";
function Component() {
const { scrollYProgress } = useScroll();
return (
<motion.div
style={{ scaleX: scrollYProgress }}
/>
);
}
```
### useScroll Options
```jsx
const { scrollYProgress } = useScroll({
target: ref,
offset: ["start end", "end start"],
container: containerRef
});
```
### Offset Format
`"start end"` where each can be: `start`, `center`, `end`, or percentage.
| Combination | Meaning |
|-------------|---------|
| `["start end", "end start"]` | While element visible |
| `["start 100%", "end -100%"]` | While scrolling down |
| `[0, 1]` | Entire document scroll |
## useTransform
Map one motion value to another:
```jsx
const { scrollYProgress } = useScroll();
const scale = useTransform(scrollYProgress, [0, 1], [1, 2]);
const opacity = useTransform(scrollYProgress, [0, 0.5, 1], [0, 1, 0]);
return <motion.div style={{ scale, opacity }} />;
```
### Multi-step Transforms
```jsx
const x = useTransform(
scrollYProgress,
[0, 0.3, 0.6, 1],
[0, -50, 50, 0]
);
```
### Disable Clamping
```jsx
const x = useTransform(
scrollYProgress,
[0, 1],
[0, 100],
{ clamp: false }
);
```
## Parallax Effect
Different scroll speeds for depth:
```jsx
function ParallaxSection() {
const { scrollYProgress } = useScroll({
target: ref,
offset: ["start end", "end start"]
});
const y = useTransform(scrollYProgress, [0, 1], [100, -100]);
return (
<motion.div ref={ref} style={{ y }}>
Parallax Content
</motion.div>
);
}
```
## Scroll Progress Bar
```jsx
function ScrollProgress() {
const { scrollYProgress } = useScroll();
return (
<motion.div
style={{
scaleX: scrollYProgress,
position: "fixed",
top: 0,
left: 0,
right: 0,
height: 4,
backgroundColor: "#00ff00",
transformOrigin: "0%"
}}
/>
);
}
```
## useInView with Variants
Trigger animation when entering viewport:
```jsx
import { useInView, motion } from "framer-motion";
import { useRef } from "react";
function FadeInSection() {
const ref = useRef(null);
const isInView = useInView(ref, { once: true, margin: "-100px" });
return (
<motion.div
ref={ref}
initial={{ opacity: 0, y: 50 }}
animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 50 }}
transition={{ duration: 0.6 }}
>
Content
</motion.div>
);
}
```
### useInView Options
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| **once** | `boolean` | `false` | Only trigger once |
| **margin** | `string` | `"0px"` | Offset for trigger |
| **amount** | `"any" \| "all" \| number` | `"any"` | Visibility threshold |
## Best practices
- ✅ Use **useScroll** with **useTransform** for scroll-linked animations.
- ✅ Use **whileInView** for simple scroll-triggered animations.
- ✅ Use proper **offset** values to control start/end.
- ✅ Use `transformOrigin` for scale animations.
## Do Not
- ❌ Use scroll animations without offset values.
- ❌ Forget to set height on scroll containers for horizontal scroll.
- ❌ Animate layout properties for scroll effects.
- ❌ Use `useInView` without `once: true` for entrance animations.
### Learn More
https://www.framer.com/motion/use-scroll/
https://www.framer.com/motion/use-transform/
https://www.framer.com/motion/use-in-view/
© C-Jeril · MIT · C-Jeril/framer-motion-skills