🌍 Public
Viewing a saved revision (read-only)
89aa8d99bc5546a4968f2e7f85917bab
Mouse Follower
This interactive visualization displays a single circle that follows the mouse cursor across an SVG canvas. Built with React, the example uses the `useState` hook to track the cursor's `clientX` and `clientY` coordinates within an `onMouseMove` event handler on the `<svg>` element. The circle's center position updates reactively via `setMousePosition`, rendering in real time as the user moves the mouse. The visualization demonstrates a simple, responsive interaction pattern using React's declarative state management and SVG rendering.
AI-generated descriptionA program that follows your mouse with a circle.