Skip to main content
100%

Fork of Mouse Follower

✓ Published0🌍 Public
YYenTingWu
Last edited Jul 7, 2021
Created on Jul 7, 2021
Forked from Mouse Follower

A circle follows the mouse cursor across an SVG canvas, updating its position in real time in response to pointer movement. The example uses React with the `useState` hook to track the mouse coordinates and re-render the circle's `cx` and `cy` attributes on every `mousemove` event. The SVG is rendered via ReactDOM, with a fixed width and height, and the code relies on the browser's native `clientX` and `clientY` event properties.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes