Collage
Similar to Masonry, Collage creates a deterministic grid layout that can absolutely position and virtualize images.
Props
Basic example
Different columns
2 - 4 columns
columns = 2
columns = 3
columns = 4
Gutter
Cover image
Different columns with cover image
2 - 4 columns with cover image
columns = 2
columns = 3
columns = 4
Layout key
You can pick a layout using the layout key (layout key is 0 by default). Depending on the number of columns of the collage, there may be multiple layouts available. If there are N layouts available, (layoutKey % N) will determine which layout is used.
layoutKey = 0
layoutKey = 1
layoutKey = 2
layoutKey = 3