Flip Layout Gallery

group .........
Galleries and grids
human .........
/lab/flip-layout-gallery

── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────

One set of images that rearranges between three completely different layouts without ever being re-created. Positions are declared purely in CSS per layout class; switching records the current rects with GSAP Flip, swaps the class, and lets Flip interpolate every tile from where it was to where the new stylesheet puts it. The stagger is dropped to zero when moving into the column layout, because a staggered arrival into a vertical list reads as a queue rather than a formation. The column layout also mounts a scroll relationship: an invisible tall strip provides the scroll length, and its progress drives the gallery and a minimap at different multipliers, so the two travel at different rates over the same gesture.

── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────

  • * Layouts are CSS, motion is Flip

    Each arrangement is just a class with different rules. Flip records the rects before the swap and interpolates to whatever the new stylesheet computes, so adding a fourth layout needs no new animation code at all.

  • * The stagger is dropped into the column

    Entering the vertical list uses stagger 0; every other transition uses 0.025. A staggered arrival into a column reads as items queuing up rather than a formation resolving.

  • * It must return to the top before flipping out

    Leaving the column layout mid-scroll scrolls to zero first, because Flip would otherwise measure the tiles from a scrolled position and fly them in from off-frame.