Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Aamitrumania-vcs
Last edited Jul 4, 2021
Created on Jul 4, 2021

A circle follows the mouse cursor across an SVG canvas, showing real-time pointer tracking in React. The visualization uses React hooks—`useState` to store the mouse position and `useCallback` for an `onMouseMove` event handler that updates the circle’s `cx` and `cy` attributes. It renders via ReactDOM into the DOM and depends on React 16.9's production UMD builds, with the SVG circle initially centered on a 960×500 viewport. The code directly maps `clientX` and `clientY` from the event to the circle’s coordinates.

AI-generated description

Program that follow your mouse with circle.

MIT Licensed

Similar vizzes