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
  • Chip Filter

    Chip Filter

    7
  • Icon Button

    Icon Button

    5
  • Background Boxes

    Background Boxes

    4
  • Emoji Picker

    Emoji Picker

    4
  • Morphing Text

    Morphing Text

    2
  • Typing Text

    Typing Text

    1
  • Treemap Chart

    Treemap Chart

    1
  • Particles

    Particles

    1

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Photo Deck

    Photo Deck

    47
  • Folded Card

    Folded Card

    45
  • Statistics Card 10

    Statistics Card 10

    304
  • Statistics Card 2

    Statistics Card 2

    309
  • Statistics Card 7

    Statistics Card 7

    336
  • CTA Section

    CTA Section

    6
  • Liquid Glass Card

    Liquid Glass Card

    198