Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
IIsaac Yuen
Last edited Apr 28, 2022
Created on Apr 28, 2022

A single gray circle tracks the mouse cursor across an SVG canvas, shifting its center position in real time to follow pointer movement. The React component manages the cursor coordinates through the `useState` hook, updating the circle's `cx` and `cy` attributes whenever the SVG's `onMouseMove` event fires. Rendered with ReactDOM, the visualization uses a fixed 960×500 viewport and a circle radius of 30 pixels, demonstrating simple state-driven interaction within a declarative UI framework.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes