Pinned Shrink Cards
- group .........
- Cards and stacks
- source ........
- https://ui.aryank.space/components/pinned-shrink-cards
- markdown ......
- /lab/pinned-shrink-cards.md
- human .........
- /lab/pinned-shrink-cards
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
Full-bleed sections that pin at the top and shrink their image to half size as the next one arrives. Each section's scale range ends at a point computed from the distance to the section below it rather than at a fixed scroll length, so uneven section heights still hand over cleanly. Pin spacing is off, so the pins share the same stretch of document and the cards overlap instead of queueing. The hero heading fades on its own trigger across four viewports, independent of the stack. GSAP ScrollTrigger.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* The scale range is measured, not fixed
Each section's end point is the offset distance to the section below it. A fixed scroll length would desynchronise the moment two sections had different heights.
* pinSpacing off is what makes them overlap
With spacing on, each pin would insert its own duration of blank document and the cards would arrive one after another instead of stacking over each other.
* The heading fades on its own trigger
Opacity is driven by a separate four-viewport trigger on the whole content, not by the hero's pin, so the text keeps fading after its section has handed over.