Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
GGUTHUBBERM
Last edited May 11, 2022
Created on May 11, 2022

A circular SVG mark follows the mouse cursor across a 960×500 canvas, displaying its current position in real time. The React application tracks `clientX` and `clientY` coordinates from the `onMouseMove` event and updates the circle’s `cx` and `cy` attributes accordingly. It uses React's `useState` and `useCallback` hooks, with D3 v5 loaded for potential use, while rendering through ReactDOM. The circle is styled with a cyan fill and black stroke, centered at the pointer’s location.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes