Cards
JS behaviour
Elastic grid
A grid whose columns follow the scroll on springs of their own: they trail, stretch and settle. With reduced motion it stays still.
Real scenarios
The component as it is used in a product — not a specimen grid.
Where our readers went
Nine destinations, three columns — scroll and watch each column trail the page on its own spring, stretch, and settle. Cards with href are real links.
A product wall, taller cells
Two columns with a heavier lag and portrait ratio — the same block feels like a catalogue instead of a gallery.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| items | array | [] | Keys: cover, image, alt, title, caption, ratio (say "4 / 5"), href; an item may also be any Htmlable or a slot named after its key. |
| columns | int | 3 | The column count; items are dealt into them in order. |
| lag / parallax | int | 90 / 40 | Each column’s spring lag (ms) and the parallax depth (px). |
Snippet
<x-nx::elastic-grid :columns="3" :items="$cities" />