Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Aallan-maker
Last edited Apr 4, 2021
Created on Apr 4, 2021

A yellow-outlined circle follows the mouse pointer across a blank grayscale SVG canvas. The React app tracks pointer movement via an SVG `onMouseMove` handler, updating React state with the cursor's client coordinates. This state drives the circle's `cx` and `cy` attributes, re-rendering the circle's position on every move. The example uses React `useState` and `useCallback` hooks within a functional component, rendered through `ReactDOM.render`.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes