Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars0🌍 Public
HHeechan lee
Last edited Apr 27, 2020
Created on Apr 27, 2020
Forked from Mouse Follower

A circle within an SVG canvas follows the mouse cursor in real time. The visualization uses React’s `useState` to track the cursor’s `clientX` and `clientY` coordinates, updating the circle’s center position on every `onMouseMove` event. The component renders a static 960×500 pixel SVG, with the circle’s radius fixed at 30 pixels. The code imports React and ReactDOM, and the initial mouse position is set to the canvas center before any user interaction.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed