Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
Ddaneslutzky
Last edited Mar 25, 2021
Created on Mar 25, 2021

A single black circle tracks the mouse across an SVG canvas, smoothly following the cursor’s exact screen coordinates in real time. The React component uses the `useState` hook to store the mouse position and a `useCallback` handler for `onMouseMove` events, updating the circle’s `cx` and `cy` attributes. Rendering is handled by ReactDOM, with D3’s `arc` import available but unused. The minimal interaction demonstrates how React state and SVG event binding can create responsive pointer-driven visuals.

AI-generated description

A program that follows your mouse.

MIT Licensed

Similar vizzes