Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
MMonish Vassantrai
Last edited Sep 23, 2021
Created on Mar 10, 2021

A circle follows the mouse cursor across a full-screen SVG canvas, tracking the pointer's current position in real time. The visualization uses React's `useState` and `useCallback` hooks to manage and update the circle's center coordinates on every `onMouseMove` event, rendering the result as an SVG `<circle>` element. The initial position is centered in the viewport, and the window dimensions determine the SVG's width and height.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes