cnippet/ui
  1. motion
  2. scroll animations
  3. scroll reveal

scroll animations

Scroll Reveal

Elements animate into view when they enter the viewport. Supports any Motion variant, configurable thresholds, and a once-only mode.

Installation

Usage

Anatomy

Good to know

  • The animation plays when the element enters the viewport. Tune when that happens with viewOptions (Motion's useInView options, e.g. { amount: 0.5 }).
  • Without once, it animates out again when it leaves the viewport and back in on return.
  • variants needs both a hidden and a visible state. The default is a simple fade.
  • When the user has turned on reduced motion, content appears in its visible state straight away when it enters the viewport.

Props

Examples

Feature Cards

Three cards slide up and fade in with staggered delay values as they enter the viewport. Each card is its own ScrollReveal instance.

Feature Section (Split Layout)

A two-column layout where the image slides in from the left and the text from the right, creating a balanced split reveal.

Stepped List

Each list item slides in from the left with an incrementing delay, building a step-by-step visual sequence on scroll.