🌍 Public
Viewing a saved revision (read-only)
d8048eaac9024cd7afee955f677b8363
Mouse Follower
A yellow circle follows the mouse cursor as it moves across a blank SVG canvas. The circle’s position is updated on every mouse-move event, using React’s `useState` and a custom `handleMouseMove` callback. The example uses React and ReactDOM to render an SVG `<circle>` element, with the cursor’s `clientX` and `clientY` coordinates directly mapping to the circle’s `cx` and `cy` attributes. The initial circle is centered at 480, 250 with a radius of 30.
AI-generated descriptionA program that follows your mouse with a circle.