Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Mouse Follower

Public visualization

Viewing a saved revision (read-only)

6c41aaef75fa4e73861a4f2c042ff63c

Fork of Mouse Follower

0 stars0🌍 Public
Jjasonamey
Last edited Sep 12, 2023
Created on Sep 12, 2023
Forked from Mouse Follower

A React component renders an interactive SVG visualization that follows the mouse cursor with a circle. Using the `useState` and `useCallback` hooks, it tracks `clientX` and `clientY` coordinates from SVG `onMouseMove` events, updating the circle’s `cx` and `cy` attributes. The circle has a fixed radius of 50 pixels within a 960×500 viewport, with its initial position at the center. The code loads React and ReactDOM from CDN, demonstrating a simple state-driven rendering loop without external data sources.

AI-generated description

A program that follows your mouse with a circle.