Skip to main content
100%

Mouse Follower (orobor0s)

✓ Published0🌍 Public
BBen
Last edited Aug 17, 2023
Created on Aug 5, 2023

A circle tracks the mouse cursor across a 960 by 500 SVG canvas, demonstrating real-time interaction with React state. The example uses React hooks (`useState`, `useCallback`) to update the circle’s `cx` and `cy` coordinates from the `clientX` and `clientY` values of the `onMouseMove` event. Rendered as an SVG circle with a fixed radius of 30, the visualization directly mirrors pointer movement without animation or data transformations.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes