🌍 Public
Viewing a saved revision (read-only)
a1db383219114b83af59495100cd4ffa
Mouse Follower
A yellow circle with a black outline follows the mouse cursor across a 960-by-500 SVG canvas. The example uses React's `useState` and a callback to track the cursor's `clientX` and `clientY` coordinates, updating the circle's `cx` and `cy` attributes directly on mouse movement. This demonstrates interactive SVG rendering within a React component, with the circle’s position driven entirely by user input.
AI-generated descriptionA program that follows your mouse with a circle.