how to implement this animation in my project using shad cn ,typescript and next js
I'll create a scroll-triggered animation similar to the one in your video using Next.js, TypeScript, and shadcn/ui components.
AnimatedElement Component: A reusable component that:
Implementation: The demo page shows several sections with different animation styles:
To add this animation to any element in your project:
import { AnimatedElement } from "@/components/animated-element"
// Basic usage
<AnimatedElement>
<YourContent />
</AnimatedElement>
// With custom animation
<AnimatedElement variant="slideInRight" delay="medium">
<YourContent />
</AnimatedElement>
fadeUp
: Elements fade in while moving up (default)fadeIn
: Simple fade in with no movementscaleUp
: Elements fade in while scaling upslideInRight
: Elements slide in from the rightslideInLeft
: Elements slide in from the leftnone
: No delay (default)short
: 100ms delaymedium
: 300ms delaylong
: 500ms delaylonger
: 700ms delayThis implementation provides a clean, reusable solution that matches the animation style in your video while using shadcn/ui components and Next.js best practices.