scroll-reveal-kit
Skill1 starsChanged 5 months agoMITView on GitHub
Add tasteful, RELIABLE scroll-triggered animations to a React site — a SectionHeading that types a "// label" kicker + draws an animated underline when it scrolls into view, a count-up number component for stats, and the correct framer-motion reveal patterns. Includes the fixes for the common framer-motion gotcha where parent→child variant propagation through whileInView silently leaves content stuck invisible. Use when the user wants scroll reveals, animated section headers, animated stat counters, or is fighting "my section is blank / animation didn't fire" bugs.
In this repository11 other files it gives its agents.
- ask-terminalSkill
- build-themeSkill
- command-paletteSkill
- deploy-doctorSkill
- github-activitySkill
- llm-endpointSkill
- numu-AOV-themesSkill
- numu-store-founderSkill
- og-imageSkill
- seo-kitSkill
- theme-toggleSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Use one of these instead:
- Very specific: line 50
Rule of thumb: never let visibility depend on a stagger that might not fire.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scroll Reveal Kit
Polished scroll animations that don't break — plus the hard-won fixes for framer-motion's reveal footguns.
What it produces
SectionHeading.tsx— a heading that, the first time it scrolls into view, types a// labelkicker and draws an animated underline. Passlabel+ heading children.CountUp.tsx— animates a number 0→N when it enters the viewport (suffix/prefix/decimals).- Reveal patterns (below) — copy-paste motion snippets that are robust.
⚠️ The framer-motion gotcha (and the fix)
The most common "my whole section is invisible" bug comes from parent→child variant
propagation through whileInView:
// ❌ FRAGILE — children can get stuck at opacity:0 if propagation doesn't fire
<motion.div initial="hidden" whileInView="show" variants={{ hidden:{}, show:{ transition:{ staggerChildren:0.1 }}}}>
{items.map(i => <motion.div variants={fadeUp} key={i}>…</motion.div>)}
</motion.div>Use one of these instead:
// ✅ ROBUST A — each child triggers its own whileInView (no propagation dependency)
{items.map((it, i) => (
<motion.div key={i}
initial={{ opacity: 0, y: 16 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0.2 }}
transition={{ duration: 0.5, delay: i * 0.08 }}>
{…}
</motion.div>
))}
// ✅ ROBUST B — for above-the-fold groups, use animate (mount) not whileInView
<motion.div initial="hidden" animate="show" variants={{ hidden:{}, show:{ transition:{ staggerChildren:0.1 }}}}>
{items.map(i => <motion.div variants={fadeUp} key={i}>…</motion.div>)}
</motion.div>Rule of thumb: never let visibility depend on a stagger that might not fire. If content must
be visible, prefer per-item whileInView or mount animate.
Scroll containers: framer's
whileInViewobserves the viewport by default. If your page scrolls inside an inneroverflow-y-autoelement, passviewport={{ root: scrollRef }}.
How to use it
- Copy
references/SectionHeading.tsxandreferences/CountUp.tsxinto components. <SectionHeading label="projects">My Projects</SectionHeading>and<CountUp end={500} suffix="+" />.- Deps:
framer-motion. Styling uses--primary/--muted-foregroundtokens + a.caretblink (include the small CSS inreferences/caret.css).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

