Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

2c5d647980004105ae8d189706da3cb7

Mouse Follower

0 stars1🌍 Public
PPriteshlip10
Last edited Aug 6, 2021
Created on Aug 6, 2021

A yellow circle follows the mouse cursor across a full-window SVG canvas in this React application. The visualization tracks pointer movement using the SVG `onMouseMove` event, which updates the circle's `cx` and `cy` coordinates in real time. The circle's position is stored in React state and re-rendered on every mouse move, while its radius remains fixed at 50 pixels. The program uses React 16.9 with a custom event handler to create an interactive, responsive display that maps the cursor's screen coordinates directly to the SVG coordinate space.

AI-generated description

A program that follows your mouse with a circle.