A beautiful and interactive sticky cards component built with Next.js, featuring smooth scroll animations and modern design principles.
- Interactive Sticky Cards: Cards that stick and animate as you scroll
- Smooth Animations: Powered by GSAP for fluid transitions and effects
- Smooth Scrolling: Enhanced with Lenis for buttery-smooth scroll experience
- Modern Design: Clean, minimalist interface showcasing design principles
- Responsive: Works seamlessly across all device sizes
- Performance Optimized: Built with Next.js 15 and modern React patterns
- Framework: Next.js 15
- Language: TypeScript
- Styling: Tailwind CSS
- Animations: GSAP with ScrollTrigger
- Smooth Scrolling: Lenis
- Package Manager: Bun
- Linting: Biome
- Clone the repository:
git clone https://github.com/omidshabab/sticky-cards-nextjs.git
cd sticky-cards-nextjs- Install dependencies:
bun install- Run the development server:
bun dev- Open http://localhost:3000 in your browser.
The project demonstrates five core design principles through interactive cards:
- Modularity - Every element is built to snap into place
- Craftsmanship - Thoughtful details and precise execution
- Reliability - Stable foundations and predictable behavior
- Performance - Fast by default with responsive interactions
- Accessibility - Designed for everyone with clear hierarchy
src/
├── app/
│ ├── layout.tsx # Root layout with Lenis provider
│ └── page.tsx # Main page with sticky cards
└── components/
└── StickyCards/
├── StickyCards.tsx # Main component with GSAP animations
└── StickyCards.css # Component styles
The sticky cards feature sophisticated scroll-triggered animations:
- Sticky Pinning: Cards stick to the viewport during scroll
- Scale Animation: Cards scale down as they're replaced
- Rotation Effect: Alternating rotation directions for visual interest
- Opacity Transitions: Smooth fade effects between cards
- Smooth Scrolling: Lenis provides momentum-based scrolling
The easiest way to deploy your Next.js app is to use Vercel:
bun dev- Start development server with Turbopackbun build- Build for production with Turbopackbun start- Start production serverbun lint- Run Biome linterbun format- Format code with Biome
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- GSAP for powerful animation capabilities
- Lenis for smooth scrolling
- Next.js for the amazing React framework
- Tailwind CSS for utility-first styling

