Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
DDavid
Last edited Mar 21, 2021
Created on Mar 21, 2021

A circle follows the mouse cursor across an SVG canvas, updating its position in real time as the pointer moves. Built with React, the app uses the `useState` hook to store the mouse coordinates and a `useCallback` handler triggered by the SVG's `onMouseMove` event. The circle is rendered as an SVG `<circle>` element with a fixed radius of 30 pixels. The viewport is set to 960 by 500 pixels, and the initial position is centered before any mouse movement occurs.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes