Skip to main content
100%

Fork of Mouse Follower

✓ Published0🌍 Public
SSamLeBlanc
Last edited Jun 4, 2021
Created on Jun 4, 2021
Forked from Mouse Follower

A circle follows the mouse cursor within an SVG canvas, updating its position in real-time as the pointer moves. The visualization uses React with a `useState` hook to track the mouse coordinates and a `useCallback` handler to update the circle’s `cx` and `cy` attributes. The rendering is done via SVG elements, with the circle initialized at the center of the 960×500 viewport. The code references React and ReactDOM, and uses the `onMouseMove` event to capture the cursor’s `clientX` and `clientY` properties.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes