Skip to main content
assetsforwordpress

Image Trail

Move your pointer across the demos and images will pop up along your path, hold for a beat, then exit by shrinking, fading, zooming, or sliding away. Everything is animated with GSAP, and the effect respects prefers-reduced-motion, swapping the motion for a gentle fade when needed.

Instructions

Vibrant tie-dye t-shirt with "SUPA STYLE" slogan, casual streetwear fashion for women, colorful and trendy outfit, accessorized with jewelry, ideal for summer or casual outings.Vibrant tie-dye crop top with "SUPA STYLE" text, paired with distressed jeans, stylish accessories, and a confident pose, showcasing trendy streetwear fashion and youthful style.Vibrant streetwear fashion featuring a colorful "SUPA STYLE" t-shirt, trendy accessories, and casual jeans, perfect for modern urban styling and fashion-forward outfit ideas.Bright young woman in colorful trendy crop top with "SUPA STYLE" graphic, distressed jeans, neon belt, and accessories showcasing youthful fashion and streetwear style.Orange crop top with "SUPA STYLE" text for trendy streetwear fashion.Vibrant young woman with orange hair wearing a black SUPA STYLE t-shirt and ripped jeans, showcasing casual street fashion, isolated on white background.Colorful trendy crop top with "SUPA STYLE" text, casual fashion streetwear for women, vibrant long sleeve shirt, stylish apparel for modern youth, fashion photo shoot for online store.Bright young woman with vibrant red hair posing in casual streetwear, wearing a colorful graphic T-shirt and ripped denim jeans, showcasing trendy fashion style.

Move your mouse around

Watch as colorful trails follow your every move,
turning your screen into a canvas of playful particles and dancing light.
Dynamic hip-hop artist with sunglasses, cap, and jewelry expressing excitement on a bright yellow background.Young male model wearing distressed jeans, oversized t-shirt, and sneakers, showcasing casual street style for fashion and lifestyle content.Young man in casual hoodie showing peace sign, vibrant yellow backdrop, streetwear style, modern urban fashion, youthful expression, trendy clothing, hip-hop influence, confident pose.A young woman smiling and making a peace sign, wearing a hoodie and ripped jeans, in front of a green screen.A confident woman in urban streetwear fashion featuring a beige and green hoodie, matching joggers, white sneakers, and layered gold jewelry, standing against a green background.Group of diverse women dancing and having fun on a green screen background, showcasing energy, joy, and dynamic movement for creative media projects.Male model wearing a blue hoodie, ripped jeans, and sneakers, posing confidently against a solid blue background, showcasing casual streetwear fashion.Stylish young men in urban streetwear with ripped jeans and accessories, showcasing modern fashion trends.Young man in casual streetwear performing a breakdance move on a blue background, showcasing energy and creativity for digital content assets.

Move your mouse here too

The fun follows your cursor!
High-quality vintage race car with bold red, black, and white design, perfect for racing and automotive website assets.A sleek red Ford Mustang with black racing stripes, surrounded by black and red smoke effects, emphasizing speed and power.Classic black muscle car with a sleek design, set against a white background, featuring lush green plants growing from the car's roof, emphasizing automotive and nature fusion.A sleek black sports car with white racing stripes parked in the rain, showcasing speed and style. Perfect for automotive and vehicle-related websites.Custom car with fiery graphic design and bold "Fury Shout" text, showcasing dynamic flames and sleek black and white vehicle for automotive art enthusiasts.A classic muscle car with bold design, perfect for automotive enthusiasts and car lovers.A sleek black race car speeding on a track with a red sun and Japanese calligraphy in the background, emphasizing speed and Japanese culture.Vintage white muscle car with black racing stripes, surrounded by artistic smoke and abstract calligraphy, emphasizing automotive style and dynamic motion.High-quality image of a Ford Mustang with a black and white zebra stripe design, showcasing speed and style, ideal for automotive and car enthusiast websites.

Move your mouse to see the action

Hover over to trigger a smooth, playful animation.

Instructions

Open the JS script in the Supa Code Block element and edit the options at the end of the script. Each option is explained below:

Setup

container (default: null) The required DOM element that acts as the stage for the effect. Any direct <img> children inside it become the "source" images that get cloned and spawned as you move the pointer. If it's missing (or GSAP isn't loaded), the function bails out with a warning and returns do-nothing refresh/destroy methods.

Spawn behavior

movementThreshold (default: 100, example uses 35) The minimum distance in pixels the pointer must travel since the last spawn before a new image appears. It's measured with Math.hypot(x - lastX, y - lastY), so it's true distance in any direction. Lower values → denser trail; higher values → images appear only after bigger movements.

delayBetween (default: 70, example uses 140) A time-based throttle in milliseconds. Even if the pointer is moving fast and instantly covers the movementThreshold, no two images can spawn closer together than this interval. Works together with the threshold: both conditions must pass.

rotation (default: 20, example uses 45) Each spawned image is randomly rotated between -rotation and +rotation degrees (via gsap.utils.random). A value of 45 means the tilt can be anywhere from -45° to +45°. Set it to 0 if you want every image perfectly upright.

Entrance animation

scaleInDuration (default: 0.6) How long, in seconds, the image takes to grow from scale: 0 to scale: 1 when it appears.

scaleInEase (default: "back.out(2)") The GSAP easing curve for that entrance. back.out(2) overshoots past full size and settles back, giving a springy "pop." You can swap in any GSAP ease string, e.g. "power3.out" (as in your example) for a smoother, non-bouncy pop.

Hold & exit animation

holdDuration (default: 0.6) How long, in seconds, the image sits fully visible at scale 1 before the exit animation starts. Technically it's applied as the delay of the exit tween. It's also reused in reduced-motion mode as the pause before the fade-out.

exitMode (default: "shrink", example uses "translateX") Determines how the image disappears. Accepted values:

  • "shrink" — scales the image down to 0 (also the fallback if you pass anything unrecognized).
  • "fade" — simply fades opacity to 0 in place.
  • "zoom" — grows the image to exitScale while fading out (an "explode toward you" effect).
  • "translateY" — slides the image down by exitDistance px while fading.
  • "translateX" — slides the image to the right by exitDistance px while fading.
  • "none" — no exit animation at all; the image is removed abruptly once holdDuration ends.

exitDuration (default: 0.6) The length, in seconds, of the exit animation itself.

exitEase (default: "power2.in") The GSAP ease for the exit. power2.in starts slowly and accelerates, which reads as the image being "sucked away." Any GSAP ease works.

exitDistance (default: 140) Only used by the "translateX" and "translateY" exit modes — the number of pixels the image travels while fading out. Ignored by all other modes.

exitScale (default: 1.6) Only used by the "zoom" exit mode — the scale factor the image grows to while fading out (1.6 = 160% of its size). Ignored by all other modes.

Accessibility / reduced motion

respectReducedMotion (default: true) If true, the script listens to the browser's prefers-reduced-motion: reduce media query. When the user has that enabled at the OS/browser level, the dramatic scaling/zooming/slid-ing is swapped for a calmer behavior defined by reducedMotion.

reducedMotion (default: "fade") What happens when reduced motion is active:

  • "fade" — the image cross-fades in over 0.25s, holds for holdDuration, then fades out over 0.35s. No scaling, rotation, or movement.
  • "none" — nothing spawns at all; the effect is effectively disabled.
  • Any other value behaves like "fade" (the code only special-cases "none").

forceReducedMotion (default: false) A manual override. If true, the reduced-motion behavior is applied always, regardless of the user's system setting — useful for testing the accessible version, or if you've decided the full animation shouldn't run for anyone. Note the check is forceReducedMotion || (respectReducedMotion && mediaQuery.matches), so forcing it works even when respectReducedMotion is false.


A couple of practical notes:

  • Units matter: durations (scaleInDuration, holdDuration, exitDuration) are in seconds (GSAP convention), delayBetween is in milliseconds, and movementThreshold / exitDistance are in pixels.
  • Dependencies between options: exitDistance only matters for translate modes, exitScale only for "zoom", and rotation only applies in full-animation mode (reduced-motion spawns never rotate).