Skip to content
ReactHive

Morph Gallery

A black and white photo grid that turns to colour on hover. Click a photo and it morphs from its place in the grid to fill the screen, corners arriving on different beats. Open, it's a carousel: each photo bends away as the next one sweeps in, and closing sends the one on screen back to its own slot.

GalleriesReactHive OriginalNo packages, just React and Tailwind CSS
Morph GalleryGalleries

How It Works

The grid is ordinary images in greyscale with the tint screened over them. Opening one hides it and draws it on a canvas over the screen, carried by the shared morph from the slot's box to a box that fits the photo inside the screen. Moving to the next photo runs the same morph sideways for two pictures at once: the leaving one heads a screen to one side, the arriving one comes in from the other, each led by its front edge so it bends as it travels. Closing runs the flight backwards, from wherever the photo on screen lives in the grid.

Use It

Install it with shadcn, or copy the 2 files into one folder, then use it like this. Change a setting in the demo and the example picks it up. Works with Next.js (App Router) and any React 19 project on Tailwind CSS v4.

npx shadcn@latest add @reacthive/morph-gallery
Example
<MorphGallery items={photos} />
  • Each item needs a src and alt; a title and caption show under the open photo. The grid is two columns on phones, three from 768px and four from 1024px.
  • Open, move through the set with the arrows, the arrow keys or a sideways swipe; it loops round the ends, and a press mid-move plays straight after it. Close with the button, a click anywhere, or Escape: the photo on screen goes back to its own slot (scrolled into view if needed) and focus returns to it.
  • tint prints the grid in one colour: black (the default) is black and white, any other colour a duotone. Hovering lifts it.
  • Plain WebGL2, no packages: copy both files. Without WebGL the open photo simply appears, and the carousel still works.

Morph Gallery, Answered.

Free to use, what it needs and where it came from.

Your Next Site Starts with a Live Demo.

Click around first. What you see is exactly what you download.

Start a Project

Tell us what you're making. A few lines is plenty; we'll ask the rest on a call.

What do you need?
Rough budget (optional)

Or email projects@reacthive.dev