Rokkit 1.0.3

Reveal

Scroll-triggered reveal animation with configurable direction and delay

Reveal provides scroll-triggered entry animations. Elements fade and slide into view when they enter the viewport. Supports configurable direction, distance, duration, delay, and stagger for animating multiple children sequentially.

Basic Reveal

Wrap any element with Reveal and it will animate into view when it enters the viewport. Click Replay to re-trigger the animation.

Single element — slides up

Staggered Children

Set stagger (ms per child) to animate multiple children in sequence. The class prop is forwarded to the wrapper so you can control layout — use class="flex gap-4" to lay children out side by side.

Card 1
Card 2
Card 3

Props

PropTypeDefaultDescription
direction'up' | 'down' | 'left' | 'right' | 'none''up'Slide direction
distancestring'1.5rem'Slide distance (any CSS length)
durationnumber600Animation duration in ms
delaynumber0Delay before animation starts in ms
staggernumber0Delay increment per child in ms
oncebooleantrueOnly animate once on first enter
thresholdnumber0.1Intersection ratio (0–1) to trigger
easingstring'cubic-bezier(0.4, 0, 0.2, 1)'CSS easing function
classstringCSS class forwarded to the wrapper element

Open in Playground

Explore all properties interactively in the Reveal playground.