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>| Prop | Type | Default | Description |
|---|---|---|---|
| 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). |
| images | — | The photos, shown in order along the trail. Pass small versions (about twice imageWidth): a photo never shows larger than that. | |
| image | number | 168 | Photo width in px, 1 or more. Default 168. |
| aspect | number | 4 / 5 | Photo width divided by height, 0.1 or more. Default 4 / 5. |
| spacing | number | 90 | Pointer 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. |
| lifetime | number | 900 | How 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. |
| max | number | 10 | The 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. |
| pool | number | 14 | How 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. |
| disabled | boolean | false | No new photos and no autopilot; touch scrolling goes back to the page. Default false. |
| on | — | 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. |
| Tab | Moves to a control in the children. The slow path then circles that control, also with idle="none". |
|---|









