Image Trail
Free, copy-pasteable Framer Motion & Tailwind CSS Image Trail component. Accessible, responsive, fully customizable, and dark-mode ready.
On this page
Create an organic, interactive experience with an Image Trail component. It detects the speed and path of the user's cursor as it traverses a container, spawning sequential high-quality images with customized animations, scale springs, and random rotations.
Use an image trail to showcase work portfolios, creative gallery previews, or add premium playful details to high-impact landing pages.
Implementation
Usage
Interactive Playground
Adjust thresholds, active image count, decay duration, random rotation limits, and see changes instantly in the dashboard below.
Move Your Cursor
Drag or hover over this container to see the premium animated photo trail trail behind your mouse.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
images | string[] | — | Array of image URLs to cycle through. |
distanceThreshold | number | 80 | Distance in px the cursor moves before spawning next image. |
maxImages | number | 8 | Maximum active images visible simultaneously. |
decayDuration | number | 0.8 | Time in seconds before an image is removed. |
rotationRange | number | 15 | Absolute bounds for random photo rotations. |
imageWidth | number | string | 140 | Width of the rendered trail images. |
imageHeight | number | string | 140 | Height of the rendered trail images. |
containerClassName | string | "" | Extra Tailwind styles for the outer container. |
imageClassName | string | "" | Extra Tailwind styles for the trailing images. |