BadtzUIBeta
Docs
Image Trail

Image Trail

Image Trail adds a dynamic, interactive trail of images that follows the cursor, enhancing user engagement and visual appeal on your website.

Image 1Image 2Image 3Image 4Image 5Image 6Image 7Image 8Image 9Image 10Image 11Image 12Image 13Image 14

Hover Me

Installation

pnpm dlx shadcn@latest add to-setup

Usage

import { ImageTrail } from "@/components/ui/image-trail";
const imageUrls = [
  "/images/components/image-trail/image-trail-1.webp",
  "/images/components/image-trail/image-trail-2.webp",
  "/images/components/image-trail/image-trail-3.webp",
  "/images/components/image-trail/image-trail-4.webp",
  "/images/components/image-trail/image-trail-5.webp",
];
<ImageTrail images={imageUrls} imageHeight={150} imageWidth={150} />

Props

ImageTrail props.

PropTypeDescriptionDefault
imagesstring[]An array of image URLs to be used in the trail effect.[]
imageWidthnumberThe width of each image in the trail (in pixels).200
imageHeightnumberThe height of each image in the trail (in pixels).200
thresholdnumberThe minimum distance the mouse must move to trigger an image change.50
durationnumberThe duration (in seconds) of the animation for each image.1.6
Image SplitInfinite Ribbon