Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

76e12ea21c5b4867a4ec5b93e059df96

Mouse Follower

0 stars0🌍 Public
Sseancote
Last edited Mar 24, 2021
Created on Mar 24, 2021

A circle traces the user's mouse location within a 960-by-500 SVG canvas, updating its center coordinates live. The React app uses the `useState` hook to store the cursor's `clientX` and `clientY` values from the `onMouseMove` event, and D3 v5 is loaded via unpkg but not directly invoked. The rendering approach relies on ReactDOM to draw the circle with SVG markup, starting from the canvas center.

AI-generated description

A program that follows your mouse with a circle