Report a problem or share feedback← Catalog
Scroll-triggered animations
curatedfreemotion/scroll-triggered
An example of triggering an animation when an element enters or leaves the viewport using Motion for React's whileInView prop.
$
pnpm add motion # then adapt the free source from https://motion.dev/examples/react-scroll-triggerednpm deps: motion
Our notes
whileInView: fade/slide sections and cards in as they enter the viewport. Use with @oc/motion-presets fadeUp + once:true. Free example (motion is MIT); copy and adapt the source from the example page.
- Source
- Motion (motion.dev)
- Kind
- transition
- Categories
- transition, scroll-effect
- Use as
- recipe — technique you apply to your own markup
- Applies to
- featurescardtext-effectimage
- Motion
- on enter, scroll · subtle · motion · low cost
- Tags
- motion, whileInView, variants
- Licence
- motion / motion/react / motion-v are MIT. Motion+ (premium components, example source, AI Kit pro tools) is paid — one-time Personal licence or per-seat Business.
- Live demo
- motion.dev
- Docs
- motion.dev
Similar
Compare all 4 →- Scroll word revealmotion/text-scroll-word-revealWords light up as you scroll through a paragraph — the classic manifesto/hero statement reveal. Free example (motion is MIT); copy and adapt the source from the example page.
- Blur Fademagicui/blur-fadeBlur + fade-in on mount or in view; the go-to entrance wrapper for sections and image grids (stagger with `delay`). Colourless. Respect prefers-reduced-motion yourself.
- Compareaceternity/compareA comparison component between two images, slide or drag to compare