Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
SSai Phaltankar
Last edited May 26, 2022
Created on May 25, 2022

A single circle tracks the mouse as it moves across a full-screen SVG canvas, with its position updating in real time to mirror the cursor’s coordinates. Built with React and ReactDOM, the app uses the `useState` hook to store the mouse position and the `useCallback` hook to handle the `onMouseMove` event on the SVG element. The viewport dimensions come from `window.innerWidth` and `window.innerHeight`, and the circle is rendered as an SVG `<circle>` element with a fixed radius of 30 pixels.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes