🌍 Public
Viewing a saved revision (read-only)
76ec16b70dfb424fb1b4d3bbd0fed7a1
Circle Follower Mouse
A circle follows the mouse cursor across an SVG canvas. The visualization tracks pointer movement and updates the circle's position in real time. Built with React and SVG, it uses React's `useState` and `useCallback` hooks to manage the cursor coordinates. A `handleMouseMove` callback on the SVG element captures `event.clientX` and `event.clientY` values, which are then passed to the circle's `cx` and `cy` attributes. The circle starts centered in the 960×500 viewport and responds immediately to any mouse movement, creating a direct interactive feedback loop.
AI-generated descriptionReact Starter code.