Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

4ce277c66a804d588fbb568a3f91e515

Mouse Follower

0 stars1🌍 Public
KKazyManazy
Last edited Dec 6, 2021
Created on Dec 6, 2021

A plain SVG circle follows the mouse cursor across a 960 by 500 viewport, its position updating in real time to match the pointer's coordinates. The visualization demonstrates mouse tracking with React state management, using the `useState` and `useCallback` hooks to handle `mousemove` events and re-render the circle. The SVG element captures the mouse position through its `onMouseMove` handler, while D3 v7 is loaded but not actively used in the interaction logic.

AI-generated description

A program that follows your mouse with a circle.