Skip to main content
100%

Fork of Mouse Follower

✓ Published0🌍 Public
Kkan qiu
Last edited Aug 30, 2021
Created on Aug 30, 2021
Forked from Mouse Follower

A circle follows the mouse cursor across an SVG canvas, with its position updating in real time as the pointer moves. The visualization uses React state and a `handleMouseMove` callback to track the cursor’s clientX and clientY coordinates, rendering the circle via SVG circle elements. Both React and D3 v5 are loaded from CDNs, with ReactDOM managing the component lifecycle. The circle starts at the canvas center and responds immediately to every mouse movement, demonstrating a simple interactive pattern built with the React hooks `useState` and `useCallback`.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes