GodUI

Scroll Reveal

Reveals its children with a spring as they scroll into view, with optional velocity skew.

I reveal on scroll

Installation

pnpm dlx shadcn@latest add "https://godui.design/r/scroll-reveal.json"

ScrollReveal springs its children in from a direction once they scroll into view. It respects prefers-reduced-motion (fading only, no travel) and can optionally skew with scroll velocity for a fluid feel.

Usage

tsx
 
import { ScrollReveal } from "@/components/godui/scroll-reveal";
tsx
 
<ScrollReveal>
  <Card />
</ScrollReveal>

Direction & distance

tsx
 
<ScrollReveal direction="left" distance={80} />

Velocity skew

tsx
 
<ScrollReveal velocitySkew>
  <Section />
</ScrollReveal>

Stagger

Use delay on adjacent reveals to stagger them.

tsx
 
<ScrollReveal delay={0} />
<ScrollReveal delay={0.1} />
<ScrollReveal delay={0.2} />

Examples

Staggered grid

Reveal a set of cards in sequence as the group scrolls into view.

Plan
Build
Ship
Measure
Iterate
Scale

From the left, no blur

Slides in from the left

Props

PropTypeDefaultDescription
direction"up" | "down" | "left" | "right""up"Direction the content travels in from.
distancenumber40Travel distance in pixels.
blurbooleantrueBlur the content in as it reveals.
delaynumber0Delay in seconds before the reveal starts.
oncebooleantrueReveal only the first time it enters the viewport.
velocitySkewbooleanfalseSkew the content by scroll velocity.

ScrollReveal also forwards every standard <div> attribute to the root element.

On this page

Built with GodUI

Beautifully crafted motion components for modern interfaces.

Star on GitHub