Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
Llupica.matthew@gmail.com
Last edited Apr 9, 2021
Created on Apr 8, 2021

A circle tracks the mouse cursor across an SVG canvas, updating its position in real time as the user moves the pointer. The visualization demonstrates a simple interactive pattern where user input directly drives an element's location. Built with React, it uses `useState` to store the mouse coordinates and `useCallback` to attach a `mousemove` event handler to the SVG element. The circle's `cx` and `cy` attributes are bound to the state, causing the shape to follow the cursor.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes