04.39 · Micro-Interactions

Image Trail

Pictures pop up in a trail behind your pointer, then fade. Best for portfolios.

Hover it

Move your pointer over the hero, drag a finger across it (or Tab to it and use the arrow keys), or press Show me.

lumenJournal · Prints · About

Photo journal · 2026

Chasing
the light

Eight places, one camera

Try it

Change a setting, then try it again or press Show me.

How often a picture appears

How far the pointer goes before the next picture appears.

How long they stay

Long stays make a longer trail behind the pointer.

Picture size

Large pictures cover more of the hero.

More optionsFewer options

How they leave

What each picture does as it disappears.

Each one leans a little to one side, at random.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add an image trail to [the hero section the pointer moves over]. Each time the pointer has traveled a set distance, drop a picture at its tip, so a still pointer leaves none. Each new picture pops up on top of the others, gliding in from where the last one appeared, stays a while, then leaves and fades away. Reuse a small set of picture elements in turn, and move, scale and fade them with transforms and opacity only, so it stays smooth. On touch screens, let a finger dragged across the section leave the trail. If the visitor has reduced motion turned on, show one picture at a time where they point, fading in and out without moving. Match the settings listed below.

Replace the words in brackets with your own element. Your settings are added at the end.

Free and open source. If this helped, a star on GitHub helps other people find it.

Star on GitHub

What it is

The full explanation is in README.md.

Good for

  • Portfolio heroes
  • Photo galleries
  • Agency sites
  • Lookbooks

Avoid on

  • Reading pages
  • Busy layouts