amankaushik481

Scroll Reveal

Cards

About

A React wrapper that animates its children sliding up into view the first time they scroll into the viewport, with configurable rise distance and stagger delay, and no motion for reduced-motion users.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Scroll Reveal to your project and fits it to your theme.

Code

How Scroll Reveal is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import ScrollReveal from "@/components/ui/scroll-reveal";

export default function ScrollRevealDemo() {
  return (
    <div className="flex min-h-[600px] w-full flex-col items-center justify-center gap-6 p-10">
      <ScrollReveal>
        <div className="w-80 rounded-xl border border-border bg-card p-6 shadow-sm">
          <h3 className="text-lg font-semibold text-foreground">
            Reveal on scroll
          </h3>
          <p className="mt-2 text-sm text-muted-foreground">
            This card slides up into place the first time it enters the
            viewport.
          </p>
        </div>
      </ScrollReveal>
      <ScrollReveal delay={0.08}>
        <div className="w-80 rounded-xl border border-border bg-card p-6 shadow-sm">
          <h3 className="text-lg font-semibold text-foreground">
            Staggered delay
          </h3>
          <p className="mt-2 text-sm text-muted-foreground">
            Give siblings a small growing delay to stagger their entrance.
          </p>
        </div>
      </ScrollReveal>
    </div>
  );
}

Dependencies

More by amankaushik481

View all
  • Icon Button

    Icon Button

    14
  • Background Boxes

    Background Boxes

    12
  • Chip Filter

    Chip Filter

    8
  • Typing Text

    Typing Text

    7
  • Treemap Chart

    Treemap Chart

    6
  • File Dropzone

    File Dropzone

    5
  • Emoji Picker

    Emoji Picker

    4
  • Morphing Text

    Morphing Text

    2

More in Cards

View all
  • Stats cards with links

    Stats cards with links

    46
  • Course Design Cards

    Course Design Cards

    1.3K
  • Liquid Glass Card

    Liquid Glass Card

    202
  • Statistics Card 2

    Statistics Card 2

    321
  • Card Studio

    Card Studio

    37
  • Astryx Clickable Card

    Astryx Clickable Card

    1
  • Admin Dashboard Cards

    Admin Dashboard Cards

    40
  • Statistics Card 10

    Statistics Card 10

    307