Masonry Layout

Here is a basic example using masonry layout.

import { MasonryPhotoAlbum } from "react-photo-album";
import "react-photo-album/masonry.css";

import photos from "./photos";

export default function App() {
  return <MasonryPhotoAlbum photos={photos} />;
}

Live Demo

Hiking boots
A pine tree forest near a mountain at sunset
A person sitting near a bonfire surrounded by trees
A hiker sitting near the cliff
Purple petaled flowers near a mountain
Green moss on gray rocks in a river
A pathway between green trees during daytime
Green trees on a brown mountain under a blue sky during the daytime
A red flower on a green grass field during the daytime
A person pointing at a beige map
A silver and black coffee mug on a brown wooden table
A man wearing a black jacket and backpack standing on a grass field during sunset
A tall mountain with a waterfall running down its side
Blue mountains
A small creek in Yosemite National Park
Two hikers walking toward a snow-covered mountain
A worm's eye view of trees at night
Silhouette photo of three hikers near tall trees
Landscape photography of mountains
Green pine trees under white clouds during the daytime
A sign warning people not to disturb nature

Sandbox

Edit on StackBlitz

Source Code

View on GitHub