design-infraGitHub
Report a problem or share feedback← Catalog

Scroll-triggered animations

curatedfree

motion/scroll-triggered

An example of triggering an animation when an element enters or leaves the viewport using Motion for React's whileInView prop.

enter · scroll — subtlerecipeRefinedPlayful
$pnpm add motion # then adapt the free source from https://motion.dev/examples/react-scroll-triggered

npm 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.
Scroll-triggered animations preview
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