AnimationsNew

Masonry Gallery

Images of different heights packed in columns with no gaps. Each one sharpens out of a blur as it reaches the screen and grows into a large view on click.

Customize

hoverColor
borderColor
captionColor

Based on Masonry Grid (MIT license) · Terms of use

More in Pro

View all

Props

9 properties
PropertyTypeDefaultDescription
items{ id: string | number; src: string; title: string }[]—Gallery images with captions.
columnsnumber3Columns from 640 px up. Phones always get two.
gapnumber16Space between images in pixels.
staggernumber0.06Delay between neighbouring images appearing in seconds.
expandablebooleantrueA click grows the image into a large view.
hoverColorstring"#ffffff"Outline of a tile under the cursor.
borderColorstring"rgba(255, 255, 255, 0.1)"Thin border of the tiles and the large view.
captionColorstring"#ffffff"Colour of the image titles. They sit on a dark shade.
classNamestring—Extra classes.

Dependencies

4 required packages

npm install motion lucide-react clsx tailwind-merge

Related components

View all