Webflow cloneable

Interactive Hover Image Trailing Webflow cloneable

Enhance user experience with an Interactive image trailing Webflow cloneable. Crafted by Dhruv Sachdev, this feature uses vanilla JavaScript to create captivating visual trails that follow the mouse cursor. Elevate web design and engage visitors with this seamless and customizable animation.

Interactive Hover Image Trailing on a desktop screen
Interactive Hover Image Trailing on a phone
Screenshots of the live preview, Nov 7, 2026 Open live preview

About cloneable

This Webflow cloneable, crafted by Dhruv Sachdev, introduces an engaging and interactive image trailing effect that enhances user experience on websites. The functionality centers around a captivating display where images dynamically follow the mouse cursor when hovering over designated elements, specifically those tagged with the .stutter-item class.

Utilizing the <canvas> element, this interaction is achieved through vanilla JavaScript, allowing for smooth and high-resolution rendering of images. When visitors hover over images or links, the effect creates a lively visual trail that aesthetically captivates and encourages users to engage more deeply with the content. This trail animation not only draws attention but also adds a layer of interactivity that can keep visitors exploring the site longer.

As users move their cursor, the JavaScript captures their position, adjusting the displaying images accordingly through a carefully crafted stutter() function. This function ensures that images fade in and out seamlessly while following the cursor's movements, creating an eye-catching stuttering effect that enhances the overall browsing experience.

By integrating this cloneable into their Webflow projects, users can elevate their website's design and interactivity, making it stand out in a competitive digital landscape. The absence of external libraries simplifies the implementation, allowing for easy customization without compromising performance or design integrity. Websites utilizing this effect will not only look more modern but also foster a playful and engaging atmosphere that can enchant visitors, encouraging them to interact further with the site’s offerings.

About Javascript

How does this JavaScript code utilize the <canvas> element in a Webflow project?

This JavaScript code uses the <canvas> element to create a visual effect where images appear to follow the mouse cursor upon hovering over specific elements (designated with the class .stutter-item). The canvas is drawn at twice the size of the window dimensions to allow for higher-resolution rendering. It leverages the getContext("2d") method to enable 2D drawing operations, particularly to draw the images dynamically as the mouse moves.

What is the purpose of the stutterLinks variable in the code and how is it related to Webflow?

The stutterLinks variable selects all elements with the class .stutter-item. In the context of a Webflow project, these could be images or links that trigger the visual effect on hover. The event listeners attached to these elements (for mouse enter and leave) define how the effect behaves—specifically, they control the loading and drawing of images onto the canvas during user interaction.

How does mouse movement affect image rendering in this Webflow JavaScript code?

The JavaScript code captures the mouse position on the screen and uses this information to render images in a way that appears to follow the cursor's movements. The mousemove event updates the goalX and goalY variables with the current cursor position, which the stutter function then uses to smoothly transition the displayed image to the mouse's location by changing mouseX and mouseY over time, creating a stuttering effect.

What does the stutter() function do in this JavaScript code?

The stutter() function is an animation loop that repeatedly redraws the canvas based on the current mouse position. It checks if a new image has been loaded, then renders it at the mouse's coordinates (adjusted for half its width and height to center it). The function uses requestAnimationFrame() for optimal performance, ensuring smooth visual updates that respond to mouse movement.

How are images handled when the mouse enters and leaves the .stutter-item elements in this code?

When the mouse enters a .stutter-item, the code gets the image source from the nested image element and creates a new Image object to prepare it for rendering on the canvas. When the mouse leaves, it sets the width and height of the image to zero and clears the canvas by calling context.clearRect(). This creates a fading effect where the image disappears when the cursor leaves the hover area.

What libraries are utilized in this JavaScript implementation for a Webflow project?

The provided JavaScript code does not utilize any external libraries for its core functionality; instead, it relies solely on vanilla JavaScript and the HTML5 Canvas API to create the interactive effects. However, there are some external scripts included at the top, like html5shiv for internet explorer compatibility and placeholders.js, but these are not crucial for the main image rendering functionality described in the code.

Similar cloneables

All cloneables →
Native Interaction Vertical Text Marquee
Native Interaction Vertical Text Marquee Enhance your website with a Text Marquee Webflow cloneable. Create captivating text animations with smooth transitions and customizable features. Designed by Dhruv Sachdev, this Text Rotation/Changer is perfect for adding a dynamic touch to your site.
Clone
GSAP On-scroll Type Animations
GSAP On-scroll Type Animations Enhance your website with captivating on-scroll typography animations using this Webflow cloneable. Easily create rotating text, unfolding letters, and more to make your content dynamic and interactive. A must-have for engaging user experiences.
Clone
CSS Link Hover Effects
CSS Link Hover Effects Enhance your website with 20 unique CSS link hover effects using this Webflow cloneable. Elevate user experience and add dynamic micro-interactions effortlessly. Perfect for easy customization without complex coding.
Clone
Circular Magnetic Button CTA
Circular Magnetic Button CTA Enhance user engagement with a circular magnetic CTA Webflow cloneable by Dhruv Sachdev. Featuring Circletype.js for dynamic circular text and FitText.js for responsive scaling. Elevate UX with interactive elements and responsive design for an engaging website experience.
Clone
Horizontal Cards Design
Horizontal Cards Design Create a polished and engaging scrolling experience with this Horizontal Cards Design Webflow cloneable. Showcase products, services, or portfolio items in a visually appealing way. Ideal for user engagement and navigation.
Clone
Glowing button effect
Glowing button effect Transform your website with the Glowing Button Effect Webflow cloneable by Dhruv Sachdev. Enhance engagement with customizable text, borders, and animations. Elevate user interaction and aesthetic appeal effortlessly.
Clone
Ribbon Finance Rebuild
Ribbon Finance Rebuild Enhance your Webflow project with the sophisticated Ribbon Finance Webflow cloneable. Crafted by Dhruv Sachdev, this template offers a user-friendly interface for DeFi investments, showcasing APY, deposits, and capacity. Communicate offerings effectively with advanced CSS styling, smooth animations, and interactive JavaScript elements, attracting clients in the DeFi sector.
Clone
Emoji Exploding Button
Emoji Exploding Button Transform user interaction with an Emoji explosion Webflow cloneable! Crafted by Dhruv Sachdev, this dynamic feature uses JavaScript libraries for compatibility and engaging animations. Customize explosion parameters and boost user experience on your website.
Clone