A high-end cinematic intro animation for a creative agency landing page. Features a stacked image card shuffle, synchronized overlay transitions, and responsive kinetic typography reveal.
This project showcases a modern agency website with advanced animations powered by GSAP (GreenSock Animation Platform). The hero section includes:
- Stacked Image Card Shuffle: Dynamic image transitions with staggered animations
- Synchronized Overlay Transitions: Coordinated visual effects during reveals
- Kinetic Typography: Animated text reveals with character-level animation control
- Responsive Design: Typography that respects line breaks on smaller screens
β¨ Advanced Animations
- GSAP timeline-based orchestration
- Smooth staggered transitions
- Expo easing for natural motion
π¨ Modern Design
- Custom typography (Dirtyline font)
- Elegant color palette
- Responsive layout
β‘ Performance Optimized
- Vite build tool with Rolldown bundler
- WebP image format support
- Font preloading and optimization
π οΈ Developer Experience
- ESLint with modern config
- Hot Module Replacement (HMR)
- Module-based architecture
- Animation: GSAP v3.14.2
- Build Tool: Vite with Rolldown
- Linting: ESLint 9.x
- Package Manager: pnpm
- Module System: ES Modules
.
βββ index.html # Main HTML entry point
βββ src/
β βββ scripts/
β β βββ main.js # Animation logic and DOM manipulation
β βββ styles/
β β βββ style.css # Main stylesheet
β β βββ fonts.css # Font imports
β βββ assets/
β βββ fonts/ # Custom font files
β βββ images/ # Project images
βββ public/ # Static assets
βββ docs/ # Documentation
βββ package.json # Project dependencies
βββ eslint.config.mjs # ESLint configuration
βββ pnpm-lock.yaml # Dependency lock file
- Node.js 18+ (or latest LTS)
- pnpm 8+ (or npm/yarn)
- Clone the repository:
git clone https://github.com/jmarellanes/gsap__website-reveal--serenity.git
cd gsap__website-reveal--serenity- Install dependencies:
pnpm installStart the development server with hot reload:
pnpm devThe site will be available at http://localhost:5173
Create an optimized production build:
pnpm buildPreview the production build locally:
pnpm preview| Script | Purpose |
|---|---|
pnpm dev |
Start development server with HMR |
pnpm build |
Create production-optimized build |
pnpm preview |
Preview production build locally |
pnpm lint |
Run ESLint to check code quality |
pnpm lint:fix |
Auto-fix ESLint issues |
The project uses GSAP timelines to orchestrate a complex sequence of animations:
-
Image Cards Reveal
- Stacked image blocks animate from bottom
- Staggered timing creates a cascading effect
-
Overlay Transition
- Images scale and shift while overlay appears
- Creates a cinematic transition effect
-
Content Reveal
- Navbar elements fade in and slide down
- Menu items follow with staggered animation
- Title text reveals character by character
HTML
- Navbar with site info and navigation menu
- Hero section with title and image container
- Semantic HTML structure
CSS
- Custom CSS Reset (Layer-based approach)
- CSS variables for theming
- Flexbox and grid layouts
- Responsive design patterns
JavaScript
- Dynamic image DOM generation
- Text character wrapping for animation
- GSAP timeline orchestration
- Module-based architecture
Edit CSS variables in src/styles/style.css
Replace image files in src/assets/images/ with your own:
- Format: WebP recommended
- Adjust image paths in src/scripts/main.js if needed
Modify animation timing and easing in src/scripts/main.js:
- Duration values (in seconds)
- Stagger values
- Easing functions (e.g.,
expo.inOut,power2.out)
- Chrome/Edge: Latest 2 versions
- Firefox: Latest 2 versions
- Safari: Latest 2 versions
- Mobile: iOS Safari 12+, Chrome Android
- Images use WebP format for smaller file sizes
- Font files are preloaded in the
<head> - GSAP uses GPU acceleration for smooth animations
- Vite's code splitting minimizes initial bundle size
Images not loading?
- Ensure image files exist in
src/assets/images/ - Verify image paths are correct in the script
Animations not playing?
- Check browser console for JavaScript errors
- Ensure GSAP is properly imported
- Verify DOM elements match selectors in JavaScript
Build failing?
- Clear node_modules:
rm -rf node_modules && pnpm install - Check pnpm version:
pnpm --version - Review ESLint errors:
pnpm lint
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2026 JosΓ© Manuel DΓaz
Contributions are welcome! Please feel free to submit a Pull Request.
For questions or feedback, please reach out to the project author.
Last Updated: February 2026