Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse follower

Public visualization

Viewing a saved revision (read-only)

4b38666371c94257b31aec29429223e4

Mouse follower

0 stars1🌍 Public
AAoibhinnRed
Last edited Oct 1, 2021
Created on Sep 29, 2021

A React component renders an SVG circle that follows the mouse cursor across a 960 by 500 pixel canvas. The circle starts at the center and updates its position on every `mousemove` event via React's `useState` and `useCallback` hooks. The `handleMouseMove` callback reads the event's `clientX` and `clientY` coordinates to set the new circle center, using ReactDOM to mount the app. No data source is involved; the visualization simply tracks pointer movement in real time.

AI-generated description

A program that follows your mouse on the screen.