← Blurr Motion hero-parallax-layers-editorial
Categorie heroes Tier 1 Techniek #11 Deps gsap

Motion Lab / Heroes / parallax layers / editorial

Movement begins with intention and ends with clarity.

Foreground layer
1. Mechanisme — kopieer 1-op-1, geen styling-keuzes
// Mechanisme: hero-parallax-layers-editorial
import gsap from 'https://esm.sh/gsap@3.12.5';
// Pas toe op je eigen selector — geen stijlkeuzes hier.
import gsap from 'https://esm.sh/gsap@3.12.5';
import{ScrollTrigger}from 'https://esm.sh/gsap@3.12.5/ScrollTrigger';
gsap.registerPlugin(ScrollTrigger);
if(window.matchMedia('(prefers-reduced-motion: reduce)').matches)return;
gsap.to('.parallax-bg',{yPercent:-20,ease:'none',scrollTrigger:{trigger:'.parallax-section',start:'top bottom',end:'bottom top',scrub:0.5}});
gsap.to('.parallax-fg',{yPercent:-8,ease:'none',scrollTrigger:{trigger:'.parallax-section',start:'top bottom',end:'bottom top',scrub:1}});
2. Skeleton — DOM + class-namen, mag herschikken
<!-- Skeleton: hero-parallax-layers-editorial -->
<div class="demo-block">
  <!-- DOM-structuur hier -->
</div>
3. Styling-template — verplicht eigen invulling per merk
/* Styling: hero-parallax-layers-editorial */
:root {
  --block-bg: ;
  --block-fg: ;
  --block-accent: ;
}