Image Trail
A portfolio you browse by moving your hand: as the pointer travels, photographs land along its path with a small turn, linger for a beat and sink away, oldest first. Put a title or anything else inside; it sits above the trail.
Ready for AI tools one file typed props installs by name prompt included
The decision inside it
Distance, not time, decides when a photo drops
A new photo lands each time the pointer has moved far enough, so a slow move lays a neat path, a fast one a scattered spread, and a still pointer never piles photos up. Only a handful are on screen at once, and each leaves on its own so the trail reads in the direction you moved.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Layro's Image Trail for this.
Install it: npx shadcn@latest add @layro/image-trail
(the @layro registry is set up in components.json, with LAYRO_KEY in .env.local)
Import it from @/components/ui/image-trail.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Free components install through the @layro registry with your CLI token: see the Namespaced tab.
When to use it
Use Image Trail for a portfolio or studio section browsed by moving the pointer: photos drop along its path and lift away. Six to twelve images work best.
Usage
import { ImageTrail } from "@/components/ui/image-trail";
const work = [{ src: "/work/casa-sal.jpg" }, { src: "/work/long-curve.jpg" }, { src: "/work/rojo.jpg" }];
export function Work() {
return (
<ImageTrail images={work} className="h-[480px]">
<div className="flex h-full items-center justify-center">
<h2 className="text-5xl font-bold tracking-tight">Places we have made.</h2>
</div>
</ImageTrail>
);
}API
“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Prop | Type | Notes |
|---|---|---|
imagesrequired | TrailImage[] | — |
size | number | Width of each photo, in px. Height follows at 5:4. Default 168. |
spacing | number | Pointer travel between photos, in px. Default 110. |
linger | number | How long a photo stays before it lifts away, in ms. Default 900. |
max | number | Most photos on screen at once. Default 6. |
Dependencies
npm packages
clsxframer-motiontailwind-mergeLayro foundations, installed alongside it
layro-themeLifetime access
Every component, and everything we ship next.
- All 132 components, source included
- Every template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.
More in Creative
All Creative componentsOdometer Stats
FreeNumbers that roll into place digit by digit, like a mechanical counter.
Slice Reveal Title
FreeA title cut in line by line, like the opening of a film.
Prism Card
FreeTilts toward the pointer and bends a band of spectrum across its face.
Magnet Cluster
FreeA grid of tiles that lean toward the pointer and settle back.
Stack Shuffle
FreeA deck of cards that deals itself as you scroll.
Horizon Pin
FreeA section that pins and turns downward scrolling into a sideways journey.