Masonry
Masonry is a grid layout that allows varying image dimensions with equal spacing. Unlike common grids, the rows are not confined to fixed heights. Simpler implementations of this layout like the CSS multi-column layout flows on a column-by-column basis. However, this has a sinistrodextral flow (left-to-right) by rows. The name masonry stems from the similarity of the layout to mason fitting stones.
Usage
import Masonry from '@ui-pack/react/masonry'
Notes
- There is a web masonry API currently implemented only by Firefox behind a flag. Read more
- Rachel Andrew describes the web native masonry here
Props
as
oneOfType: string, function
Default: div
gap
oneOfType: string, number
Default: 10
columns
oneOfType: string, numberrequired
Default: 3
children
noderequired
style
object
CSS style for container