Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
Ccaineosborne
Last edited Jan 8, 2022
Created on Jan 8, 2022

A circle follows the mouse cursor as it moves across an SVG canvas, updating its position in real time. The visualization uses React state via `useState` and `useCallback` to track mouse coordinates from the `onMouseMove` event, and renders the circle with SVG markup. The React DOM library mounts the component to the page, while the circle’s center is set to the current pointer location. This demonstrates a simple interactive pattern where user input directly drives visual output.

AI-generated description

A program that follows your mouse with a circle

Comments

Sign in to join the discussion.

MIT Licensed