A stunning, interactive MacBook Pro showcase website featuring cutting-edge animations powered by GSAP (GreenSock Animation Platform), React Three Fiber, and Tailwind CSS. This project demonstrates advanced web animation techniques with smooth parallax effects, 3D model interactions, and immersive scrolling experiences.
MacBook Pro landing page with animated title and video background
Interactive 3D MacBook models (14" & 16") with color customization
M4 Chip features with video mask animation
Multi-layer parallax effects with performance images
AI-powered features with animated 3D models
Product highlights in a masonry grid layout
- ScrollTrigger Integration: Animations triggered by scroll position
- Timeline Animations: Complex sequenced animations
- Parallax Effects: Multi-layer depth animations with different scroll speeds
- Smooth Scrubbing: Direct scroll-to-animation linking
- React Three Fiber: WebGL-powered 3D rendering
- Interactive Controls: Rotate, zoom, and explore MacBook models
- Model Switching: Smooth transitions between 14" and 16" models
- Material Animations: Dynamic opacity and fade effects
- Multi-Layer Parallax: 6+ different scroll speeds for depth
- Rotation Parallax: Dynamic rotation based on scroll
- Scale Animations: Zoom effects for emphasis
- Blur & Focus: Depth-of-field effects
- Opacity Transitions: Smooth fade in/out animations
- Center Spotlight: Dramatic entrance/exit for featured content
- Mobile-first approach with Tailwind CSS
- Breakpoint-specific animations
- Touch-friendly interactions
- Optimized for all screen sizes
- GPU-accelerated transforms
- Efficient scroll listeners
- Lazy loading of assets
- Optimized 3D model rendering
- React 19.1.1 - UI framework
- Vite 7.1.7 - Build tool and dev server
- JavaScript (ES6+) - Programming language
- GSAP 3.13.0 - Professional-grade animation library
- @gsap/react 2.1.2 - React hooks for GSAP
- React Three Fiber 9.4.0 - React renderer for Three.js
- @react-three/drei 10.7.6 - Useful helpers for R3F
- Three.js 0.181.0 - 3D graphics library
- Tailwind CSS 4.1.16 - Utility-first CSS framework
- @tailwindcss/vite 4.1.16 - Tailwind Vite plugin
- clsx 2.1.1 - Conditional className utility
- Zustand 5.0.8 - Lightweight state management
- react-responsive 10.0.1 - Media query hooks
- Node.js (v18 or higher)
- npm or yarn
- Clone the repository
git clone https://github.com/AshimChoudhary/Macbook_GSAP.git
cd Macbook_GSAP- Install dependencies
npm install- Start development server
npm run dev- Open in browser
Navigate to http://localhost:5173
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build for production |
npm run preview |
Preview production build locally |
npm run lint |
Run ESLint for code quality |
Macbook_GSAP/
โโโ public/
โ โโโ fonts/ # Custom fonts
โ โโโ models/ # 3D model files (.glb)
โ โโโ videos/ # Video assets
โ โโโ *.png/svg # Images and icons
โโโ src/
โ โโโ components/
โ โ โโโ models/ # 3D model components
โ โ โ โโโ Macbook-14.jsx
โ โ โ โโโ Macbook-16.jsx
โ โ โ โโโ Macbook.jsx
โ โ โโโ three/ # Three.js utilities
โ โ โ โโโ ModelSwitcher.jsx
โ โ โ โโโ StudioLights.jsx
โ โ โโโ Features.jsx # AI Features section
โ โ โโโ Footer.jsx # Footer component
โ โ โโโ Hero.jsx # Landing hero section
โ โ โโโ Highlights.jsx # Product highlights
โ โ โโโ Navbar.jsx # Navigation bar
โ โ โโโ Performance.jsx # Performance section with parallax
โ โ โโโ ProductViewer.jsx # 3D product viewer
โ โ โโโ Showcase.jsx # M4 chip showcase
โ โโโ constants/
โ โ โโโ index.js # App constants and data
โ โโโ store/
โ โ โโโ index.js # Zustand store
โ โโโ App.jsx # Main app component
โ โโโ index.css # Global styles
โ โโโ main.jsx # App entry point
โโโ index.html
โโโ package.json
โโโ vite.config.js
โโโ README.md
- Video playback animation
- Text fade-in effects
- Call-to-action button animations
- 3D model rendering
- Interactive presentation controls
- Model switching with slide animations
- Color picker with active states
- Size selector (14" / 16")
- Video mask animation
- Text reveal on scroll
- Opacity transitions
- Multi-column layout animations
11 Different Animation Types:
- Multi-layer vertical parallax (6 layers)
- Horizontal parallax drift
- Rotation parallax (ยฑ5ยฐ)
- Scale depth effect
- Opacity fade transitions
- Blur-to-focus effect
- Center image spotlight (p5)
- Dramatic zoom in/out
- Rotation entrance/exit
- Blur and brightness effects
- Continuous glow effect
- Pulsating scale animation
- 3D model showcase
- Feature cards animation
- Icon animations
- Scroll-triggered reveals
- Masonry grid layout
- Staggered card animations
- Gradient effects
- Hover interactions
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
plugins: [react(), tailwindcss()],
});Custom theme with:
- Custom fonts (Regular, Medium, SemiBold, Bold)
- Custom colors (primary, dark, light variants)
- Custom utilities (flex-center, col-center, abs-center)
- Custom components
- Rotation: Click and drag to rotate
- Zoom: Mouse wheel to zoom in/out
- Snap: Auto-snap to default position
- Presentation Mode: Smooth, physics-based controls
- Space Gray (#adb5bd)
- Midnight (#2e2c2e)
- Smooth color transitions
- 14" MacBook Pro
- 16" MacBook Pro
- Animated model switching
- GPU Acceleration: Using transform3d and will-change
- Scroll Optimization: Throttled scroll listeners
- Lazy Loading: Models loaded on demand
- Code Splitting: Dynamic imports for routes
- Asset Optimization: Compressed images and models
- GSAP's gsap.set(): Instant property updates
- ScrollTrigger caching: Optimized scroll calculations
- useGSAP hook: Proper cleanup and scoping
- Dependency tracking: Animations refresh on state changes
This project demonstrates:
- Advanced GSAP techniques
- React Three Fiber integration
- Scroll-based animations
- Parallax effects
- 3D model rendering
- State management with Zustand
- Responsive design patterns
- Modern React practices
Contributions, issues, and feature requests are welcome!
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
Ashim Choudhary
- GitHub: @AshimChoudhary
- Repository: Macbook_GSAP
- Apple - Design inspiration
- GSAP - Amazing animation library
- Three.js Community - 3D graphics resources
- React Three Fiber - Making 3D in React easy
- Tailwind CSS - Utility-first CSS framework
For questions or feedback, please open an issue on GitHub.
โญ Star this repo if you found it helpful!
Made with โค๏ธ and GSAP