🌍 Public
Viewing a saved revision (read-only)
f37f02cc1f5d4c2eb40aff65943dc319
Mouse Follower Replica
This example shows a circle that follows the mouse cursor across an SVG canvas, updating its position in real time. Built with React, it uses the `useState` hook to store mouse coordinates and a `handleMouseMove` callback that updates state on every SVG `onMouseMove` event. The circle’s `cx` and `cy` attributes are bound to the current state, while the SVG viewport is set to an 960×500 pixel area. No external data is used; the visualization responds solely to user input.
AI-generated descriptionA program that follows your mouse with a circle.