Components/Effects
Image Trail
A very smooth and interactive trail of images that follows your mouse cursor with discrete step interpolation.
imagetrailmouseeffectanimation
Preview
Installation
npx shadcn@latest add https://grootstudio.vercel.app/r/image-trail.jsonUsage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| items | string[] | [] | An array of image URLs to use in the trail. | |
| distance | number | 20 | The fraction of the window width required to trigger spawning a new image. Larger numbers mean closer images. | |
| maxNumberOfImages | number | 5 | The maximum number of images that can be visible on the screen at the same time. | |
| fadeAnimation | boolean | false | Whether to automatically fade out the image after 1.5 seconds regardless of trail length. | |
| className | string | undefined | Optional class names for the container section. | |
| imgClass | string | "w-40 h-48" | Class names for individual image elements, particularly for adjusting sizing constraints. |