Scroll Reveal
Viewport-triggered entrance with multiple variants: fade-up, slide-left/right, scale, and blur. Uses IntersectionObserver with spring physics.
Card 1
This card reveals with staggered animation as you scroll.
Card 2
This card reveals with staggered animation as you scroll.
Card 3
This card reveals with staggered animation as you scroll.
Card 4
This card reveals with staggered animation as you scroll.
Card 5
This card reveals with staggered animation as you scroll.
Card 6
This card reveals with staggered animation as you scroll.
Card 7
This card reveals with staggered animation as you scroll.
Card 8
This card reveals with staggered animation as you scroll.
Card 9
This card reveals with staggered animation as you scroll.
Card 10
This card reveals with staggered animation as you scroll.
Installation
Copy and paste
Copy the component source code and paste it into your project.
import { ScrollReveal } from "driftkit";Props
| Name | Type | Required | Description |
|---|---|---|---|
children | ReactNode | Yes | Content to reveal. |
variant | "fade-up" | "fade-down" | "slide-left" | "slide-right" | "scale" | "blur" | No | Animation variant. |
delay | number | No | Delay in seconds. |
once | boolean | No | Only animate once. |
stiffness | number | No | Spring stiffness. |
damping | number | No | Spring damping. |
Playground
Tune spring physics for this component
Live Preview
Spring Physics
Generated Code
const springConfig = {
"type": "spring",
"stiffness": 300,
"damping": 30,
"mass": 1
};
// Basic hover animation
<motion.div
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
transition={springConfig}
>
<ScrollReveal />
</motion.div>
// Advanced with custom animations
<motion.div
animate={{
scale: [1, 1.02, 1],
y: [0, -4, 0]
}}
transition={{
...springConfig,
repeat: Infinity,
repeatDelay: 2
}}
>
<ScrollReveal />
</motion.div>Source Code
View the source code on GitHub to see the full implementation.
View on GitHub