Image Gallery Featuring Popovers and AIM (Anchor-Interpolated Morph)

Image Gallery Featuring Popovers and AIM (Anchor-Interpolated Morph)

3 Min Read

As I was exploring Adam’s AIM technique recently, I thought a great application would be a photo gallery. The AIM (Anchor-Interpolated Morph) technique can animate elements entering and exiting from other elements, utilizing those elements as CSS anchors.

In a photo gallery, the “thumbnails” can act as anchors, with larger versions of photos animating in from these thumbnail anchors and back out again.

This type of animation not only looks impressive, but serves a functional purpose by reminding you where an element originates and where it disappears to. For instance, if you are reviewing images from a photo shoot, this animation serves as a helpful reminder as you navigate through them.

Here’s the demo:

Here’s a video if your browser doesn’t support this technology mix.

HTML and CSS Setup (No JavaScript by Default)

A cool benefit is creating a photo-grid like this with the ability to “open larger” without using any JavaScript. It’s as straightforward as this:


Mountain landscape

That’s a

You might also like