Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

c27f9d7854304cbfa327f338bcf16d43

Mouse Follower

0 stars0🌍 Public
GGUTHUBBERM
Last edited May 11, 2022
Created on May 11, 2022

A circular SVG mark follows the mouse cursor across a 960×500 canvas, displaying its current position in real time. The React application tracks `clientX` and `clientY` coordinates from the `onMouseMove` event and updates the circle’s `cx` and `cy` attributes accordingly. It uses React's `useState` and `useCallback` hooks, with D3 v5 loaded for potential use, while rendering through ReactDOM. The circle is styled with a cyan fill and black stroke, centered at the pointer’s location.

AI-generated description

A program that follows your mouse with a circle.