π§ Description
This interactive scooter product showcase demonstrates advanced scroll-driven animation techniques using GSAP (GreenSock Animation Platform) and ScrollTrigger plugin. The page creates an engaging, narrative-driven experience where scrolling reveals product details, specifications, and characteristics through coordinated animations and dynamic content transitions.
What Makes This Project Exceptional?
Visual Features:
- Complex multi-timeline animation system
- SVG masking with dynamic clipping paths
- Product image that morphs and repositions during scroll
- Staggered text animations (fade, scale, slide)
- Specifications and characteristics panels reveal progressively
- Smooth viewport pinning for controlled scrolling
- Header transitions and background animations
- Intro logo animations with parallax effects
Technical Innovation:
- GSAP Timeline Management: 8 coordinated timelines working in sequence
- ScrollTrigger Integration: Precise scroll-based animation control
- Scrub Property: Smooth animation synchronization with scroll velocity
- SVG Clipping: Dynamic mask path manipulation
- Stagger Animations: Synchronized multi-element transitions
- Programmatic Sequencing: Hierarchical animation control
- Easing Functions: Sophisticated timing curves (expo.out, sine.out)
The Concept
Narrative-Driven Experience:
The animation tells a story as user scrolls:
- Intro (0-700px): Welcome screen with logo and tagline
- Product Introduction (700-1500px): Product name and model variants appear
- Transition (1500-2500px): Product image scales and positions shift
- Specifications (2500-3800px): Engine specs slide in from left
- Characteristics (3800-4600px): Physical specs slide in from right
- Outro (4600-5700px): Price and call-to-action button
- Total Scroll Distance: 5700px of coordinated animations
Each section uses dedicated timelines synchronized to scroll position, creating a seamless, choreographed experience.
π» Step 1: HTML Structure
Complete HTML Code
β Semantic Elements: Proper heading hierarchy, list structure β ID/Class Naming: Clear, descriptive identifiers for JavaScript targeting β Accessibility: Alt text for images, semantic HTML β Performance: Minimal nested elements, optimized structure β Organization: Logical grouping of related content β Comments: Clear section demarcation with comments β Mobile-Ready: Viewport meta tag for responsive design
π¨ Step 2: CSS β Layout, Styling & Positioning
Complete CSS Code
CSS Architecture Explanation
1. Grid-Based Layout
Purpose:
gridwithplace-items: centercenters wrapper- Wrapper has fixed max dimensions for consistent animation
position: relativecreates stacking context for absolute positioning
2. SVG Clipping Mask System
How It Works:
.bkgapplies clip-path from SVG mask#wrapWinrect height animates from 80 to 800- Gradient background clips to animated rectangle
- Creates reveal/masking effect
JavaScript animates:
3. Absolute Positioning Strategy
Z-Index Hierarchy:
- 1: Background gradient
- 4: Header
- 6: Intro section
- 9: Panel heading
- 10: Product image
- 11: Model list
- 12: Rotator
- 20: Specs/Chars
- 30: Outro
- 40: SVG mask
Layout Result:
βββββββββββββββββββ
β Engine (h2) β β Spans 2 columns
ββββββββββ¬βββββββββ€
β Specs1 β Specs2 β β Two-column specs
ββββββββββ΄βββββββββ
5. Typography & Color Hierarchy
Color Scheme:
- #f0f0f0: Light headings (high contrast)
- #717171: Body text (readable on light background)
- #8a8a8a: Inactive labels
- #4b4b4b: Section headings
βοΈ Step 3: JavaScript β GSAP Timeline Animation
Complete JavaScript Code & Explanation
Images used in the above program
