Skip to main content
100%

Fork of Mouse Follower

✓ Published0🌍 Public
HHanh Hoang
Last edited May 1, 2021
Created on May 1, 2021
Forked from Mouse Follower

An SVG circle follows the pointer across a 960×500 canvas, updating its position in real time through React state. The visualization uses React’s `useState` and `useCallback` hooks to handle mouse-move events, with `clientX` and `clientY` coordinates directly mapping to the circle’s `cx` and `cy` attributes. Rendered via ReactDOM, the circle is styled with a fixed radius, `aliceblue` fill, and grey stroke. The example demonstrates event-driven interaction in a React-based SVG environment, relying on the UMD builds of React 16.9.0.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes