Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
JjohnmurphyLC
Last edited May 28, 2023
Created on May 27, 2023

A circle follows the mouse cursor inside an SVG canvas. The visualization shows the cursor's position in real time, updating the circle's center coordinates as the mouse moves. The React application uses the `useState` hook to store mouse coordinates and the `useCallback` hook to handle the `onMouseMove` event on the SVG element. The circle is rendered with SVG, and ReactDOM renders the component into the HTML root element.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed