Animations
FadeIn
Fade an element in on mount or when it enters the viewport.
Quick Preview
I fade in on mount
Installation
npm install framer-motion
// Copy fromsrc/components/animations/FadeIn.tsx
Examples
Staggered fade-in
First item
Second item
Third item
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children* | React.ReactNode | - | Content to animate |
delay | number | 0 | Delay before animation starts (seconds) |
duration | number | 0.6 | Animation duration (seconds) |
whenInView | boolean | false | Trigger when element enters viewport |
once | boolean | true | Only animate once when using whenInView |
yOffset | number | 16 | Vertical offset to start from (px) |
className | string | - | Additional CSS classes |