Skip to content

Image Trail

Pro

Moving the pointer leaves a trail of photos that pop in and go, in five styles. A slow path draws the trail when no pointer is there.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 18, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Image Trail needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
22
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Give the root a height and the photos. The children sit above the trail.

The sample also uses Button. One command adds them with this item:

travel-hero.tsx

ImageTrail

<div>
PropTypeDefaultDescription
variant"drift""elastic""fall""reveal""stack""drift"How each photo moves: drift (default) floats on and fades, stack drops prints that stay, reveal opens a window, fall drops under gravity, and elastic stretches and springs back.
rounded"default""full""default"The photo corners: default (8px, 4px for stack) or full (circles with a square photo).
imagesRequired—The photos, shown in order along the trail. Pass small versions (about twice imageWidth): a photo never shows larger than that.
imageWidthnumber168Photo width in px, 1 or more. Default 168.
aspectRationumber4 / 5Photo width divided by height, 0.1 or more. Default 4 / 5.
spacingnumber90Pointer travel between two photos, in px, 8 or more. Default 90. A photo that would land on the last one waits, so a small value on a fast move leaves about half a photo between drops.
lifetimenumber900How long a photo stays, in ms, 300 or more. Default 900. stack prints stay until the pool needs them, and fall photos stay until they leave the bottom edge, so both skip it.
maxTiltnumber10The largest lean in degrees, at full sideways speed. Default 10. drift and fall use all of it, stack half, and reveal and elastic stay upright.
poolSizenumber14How many photos can be on screen at once: the node pool, 2 to 60. Default 14.
idle"autopilot""none""autopilot"With no pointer: autopilot (default) draws a slow figure eight, so the area looks complete at rest; none leaves it empty. Keyboard focus inside runs the autopilot around the focused element in both cases.
disabledbooleanfalseNo new photos and no autopilot; touch scrolling goes back to the page. Default false.
onImageError—Called when a photo fails to load or decode. The trail skips it.
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Give the root a height, and pass small photos of about twice imageWidth.
  • Put the headline and the actions in the children. They render above the photos and stay clickable.
  • Use variant to set how a photo moves: drift, stack, reveal, fall, or elastic.
  • Set idle="none" when the area must stay empty until the pointer comes.
  • For photos that people must see, browse, and read one by one, use a Carousel.
  • For one photo that moves with the page scroll, use Parallax Image.
TabMoves to a control in the children. The slow path then circles that control, also with idle="none".

The photo layer is aria-hidden: the trail is decoration, and screen readers read only the children.

Keyboard focus on a control in the children starts the slow path around that control.

The root sets touch-action: pan-y: a sideways drag draws, and an up or down swipe scrolls the page. disabled gives touch back to the page.

Photo pop
follow · spring · the photo grows from 60% with a start speed
Drift and elastic fade
progress · `lifetime` (900ms by default) · the last 40% fades the photo
Stack leave
fade-exit · the oldest print fades and shrinks to 90% when the pool needs it
Reveal open
panel · a window opens from the middle while the photo settles from 130%
Reveal close
revealExit · the window closes to the middle
Elastic stretch
elastic · a bouncy spring (stiffness 420, damping 12) takes the stretch back to 100%
Fall
progress · up to 2.4s · gravity of 2400 px/s² pulls the photo past the bottom edge
Slow path
progress · 6s · a figure eight with no pointer, 1.5s after the pointer leaves
  1. AddedImage Trail.
Open the release