safe-scroll-reveal

Implements reduced-motion-safe scroll reveal animations for Framer Motion on Next.js static sites.

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/timikalo7/Execute --skill safe-scroll-reveal-timikalo7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-scroll-reveal
Source: https://github.com/timikalo7/Execute/tree/main/.claude/skills/safe-scroll-reveal
Command: npx skills add https://github.com/timikalo7/Execute --skill safe-scroll-reveal-timikalo7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Scroll reveal animations on server-rendered or statically exported Next.js sites often break in subtle ways: hydration mismatches from branching on the OS reduced-motion preference, invisible text when MotionConfig disables transforms, and clipped layouts from overflow-hidden wrappers. This Skill provides a proven pattern that avoids all four failure modes. ## Core Features & Use Cases - Scroll-linked reveals: Ties animation progress to element scroll position via useScroll and useTransform, so content can never be stranded off-screen and no reduced-motion branch is needed. - Deterministic load animations: Gives above-the-fold content a fixed initial/animate state instead of OS-preference branching, eliminating hydration mismatches. - Safe overflow handling: Uses overflow-x: clip instead of overflow-hidden so horizontal reveals do not break position: sticky scroll scenes. - Use Case: When building a marketing site with Next.js App Router and static export, apply this pattern to add fade/slide-in reveals and mask-rise headings without triggering dev-only hydration warnings or hiding text for reduced-motion users. ## Quick Start Apply the safe-scroll-reveal pattern to add scroll-linked entrance animations to my Next.js static export site.

Frequently Asked Questions about safe-scroll-reveal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add scroll reveal animations in Framer Motion without hydration errors?

Tie the reveal to scroll position with useScroll and useTransform instead of branching initial state on useReducedMotion. Scroll-linked reveals always reach their visible target, so no reduced-motion branch is needed and server HTML matches the client.

Why does useReducedMotion cause hydration mismatch in Next.js?

The server cannot read the OS reduced-motion preference, so branching initial or hidden state on useReducedMotion produces different HTML than a reduced-motion client renders. React flags this as a hydration mismatch, and the warning only appears in dev mode.

Does MotionConfig reducedMotion work with transform-based reveals?

No. MotionConfig with reducedMotion="user" disables transforms for reduced-motion users, so any reveal that uncovers text via a transform leaves the text parked off-screen. Gate only pointer flourishes with a small motionAllowed helper instead.

Why does overflow-hidden break position sticky in scroll animations?

An overflow-hidden wrapper creates a new scroll container context that disables position: sticky descendants. Use overflow-x: clip on the wrapper instead, which contains horizontal reveal travel without breaking sticky scroll scenes.

How do I verify reduced-motion reveals on a static export build?

Run a visual-qa sweep with a source lint that scans for reduce-branched initial, hidden, or whileInView props, since the built static output never logs the dev-only hydration warning. The accessibility pass must scroll through every reveal and wait out animations before sampling.