Skip to content
PixiKit

Masonry

A masonry grid whose tiles spring into place as they scroll into view, zoom on hover, reorder by drag and open in a lightbox.

pixikit.com/docs/components/masonry

Customize

Columns
Column width240px
Gap12px
Radius12px
Animate from
Stagger0.05s
Duration0.60s
Bounce0.15
Blur to focus
Reveal on scroll
Hover effect
Focus on hover
Captions
Parallax0.00
Lightbox
Draggable

Props

21
NameTypeDefaultDescription
itemsMasonryItem[]DEFAULT_ITEMSThe tiles. Give width and height to lay out at once, otherwise the image is measured; span makes a tile cover more columns.
columns"auto" | number"auto"The column count. Auto fits as many columns of columnWidth as the container allows.
columnWidthnumber240The target column width for auto columns, in pixels.
gapnumber12Space between tiles, in pixels.
radiusnumber12Corner radius of the tiles, in pixels.
animateFrom"bottom" | "top" | "left" | "right" | "center" | "random" | "none""bottom"Where tiles come from as they appear.
staggernumber0.05Delay between tiles appearing, in seconds.
durationnumber0.6Length of the motion that moves tiles in and between places, in seconds.
bouncenumber0.15How much the tiles overshoot as they settle, from 0 to 0.9.
blurToFocusbooleantrueTiles sharpen from a blur as they appear.
revealOnScrollbooleantrueTiles appear as they scroll into view instead of all at once.
hoverEffect"zoom" | "lift" | "tilt" | "none""zoom"Zoom the image, lift the tile, or tilt it toward the cursor.
focusOnHoverbooleanfalseFades the other tiles while one is hovered.
captions"hover" | "always" | "none""hover"When the title and description show over a tile.
parallaxnumber0How far images drift inside their tiles as the page scrolls, from 0 to 1.
lightboxbooleantrueClicking a tile opens it full size; arrow keys move between images and Escape closes.
draggablebooleantrueDrag tiles with a mouse to reorder them; the grid reflows around the tile as it moves.
onItemClick(item: MasonryItem, index: number, event: ReactMouseEvent) => voidNoneCalled when a tile is clicked. Call event.preventDefault() to skip the lightbox or link.
onReorder(items: MasonryItem[]) => voidNoneCalled with the new order after a drag.
classNamestringNone
styleCSSPropertiesNone

More media components in Pro

View all

Related