Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
RRichard Burd
Last edited Jan 11, 2022
Created on Dec 19, 2021

A single yellow circle follows the mouse cursor across an SVG canvas, updating its position in real time. The visualization uses React’s `useState` and `useCallback` hooks to track mouse coordinates via the SVG `onMouseMove` event, then re-renders the circle’s `cx` and `cy` attributes. It is built with React 16.9 and rendered as SVG, with the initial circle centered at a fixed width and height of 960 by 500 pixels.

AI-generated description

A program discussed here follows your mouse with a circle

MIT Licensed

Similar vizzes