Mouse Follower
✓ Published1🌍 Public
A single dark circle tracks the cursor’s movement across a 960×500 SVG canvas. The circle’s center is repositioned directly to the mouse’s client coordinates on every move event, using React state updates triggered by the SVG’s `onMouseMove` handler. Built with React and ReactDOM, the example renders purely through SVG elements, with the circle maintaining a constant radius of 30 pixels while following the pointer smoothly across the viewport. The code initializes the circle at the canvas center before any mouse activity occurs.
AI-generated descriptionA program that follows your mouse with a circle!
MIT Licensed