🌍 Public
Viewing a saved revision (read-only)
44dd206f4cd948bd9dc5302b448a6b36
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.