Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
IIverefiner
Last edited Nov 1, 2021
Created on Nov 1, 2021

A single circle follows the mouse cursor across a full-screen SVG canvas. Built with React and SVG, the example uses the `useState` and `useCallback` hooks to track `clientX` and `clientY` coordinates from the SVG element's `onMouseMove` event, updating the circle's `cx` and `cy` attributes in real time. The circle starts at the center of the viewport and moves smoothly with pointer input.

AI-generated description

A Program that follows your mouse with a circle.

MIT Licensed

Similar vizzes