Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Llaurence beattie
Last edited Sep 17, 2021
Created on Sep 13, 2021

A circle tracks the mouse cursor across a 960 by 500 SVG canvas, updating its position in real time as the user moves the pointer. The React component uses `useState` to store the mouse coordinates and `useCallback` to handle the `onMouseMove` event, passing the event's `clientX` and `clientY` values to reposition the circle via its `cx` and `cy` attributes. It renders with React 17 and D3 v7.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes