Mouse Follower
✓ Published0🌍 Public
This interactive SVG visualization displays a circle that continuously follows the mouse cursor across the viewport. The circle remains centered on the pointer’s position, updating in real time as the user moves the mouse. Built with React and rendered as SVG, it uses the `useState` hook to track mouse coordinates and a `handleMouseMove` callback triggered by the SVG element’s `onMouseMove` event. The circle’s `cx` and `cy` attributes are bound to these state values, with a fixed radius of 30 pixels. The visualization starts with the circle centered on the screen.
AI-generated descriptionA program to interactively change the position of a circle depending on the position of the mouse.
MIT Licensed