Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
TTousifAhamed
Last edited Sep 14, 2021
Created on Sep 14, 2021

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 description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes