Mouse Follower
✓ Published1🌍 Public
A single gray circle tracks the mouse’s exact position across an SVG canvas, updating its center coordinates in real time as the pointer moves. Built with React’s `useState` and `useCallback` hooks, the circle’s `cx` and `cy` attributes are re-rendered on every `mousemove` event, using the `clientX` and `clientY` values from the event object. D3 is loaded but only for its `arc` import, which remains unused in the visible code. The SVG viewport is fixed at 960 by 500 pixels.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed