Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

b8046eb51cde42d88293bcc447cf297e

Mouse Follower

0 stars0🌍 Public
AAbhishek-Bohora
Last edited Jul 21, 2021
Created on Jul 21, 2021

A yellow circle follows the mouse cursor as it moves across an SVG canvas. The visualization uses React state management with the `useState` and `useCallback` hooks to track the cursor's `clientX` and `clientY` coordinates, updating the circle's `cx` and `cy` attributes via React's render cycle. The SVG is rendered by ReactDOM, while D3 v5 is loaded but not directly used in this example. The circle maintains a fixed radius of 30 pixels and responds immediately to pointer movement within the 960×500 viewport.

AI-generated description

A program that follows your mouse with a circle