Pinned Scale Mosaic
- group .........
- Galleries and grids
- source ........
- https://ui.aryank.space/components/pinned-scale-mosaic
- markdown ......
- /lab/pinned-scale-mosaic.md
- human .........
- /lab/pinned-scale-mosaic
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
A sparse photo grid where every row grows in and then collapses away. Each row runs two triggers: one scales its images up from nothing as the row rises into view, a second pins the row at the top and scales them back to zero as it leaves, with pinSpacing off so the next row slides up over it. Images scale about their outer corner rather than their center, alternating left and right, so a row opens outward from the edges.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* Two triggers per row, plus a guard
One scales in, one pins and scales out, and a third restores full scale when a row is re-entered without its exit having started. Without that guard, scrubbing back leaves rows stuck at zero.
* pinSpacing off is what stacks the rows
Because the pinned row reserves no space, the following row slides up over it while it shrinks, so rows overlap instead of queueing.
* Corner origins open the row outward
Images scale about their outer corner, alternating left and right, so a row unfolds from the edges of the grid rather than blooming from its middle.