Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

c14f04543ead454fb73d59956e7e80a2

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.