Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

787febfbe04043bb9a0355a237bbaf3c

Mouse Follower

0 stars1🌍 Public
WWolfgang
Last edited Mar 16, 2021
Created on Mar 16, 2021

A circle follows the mouse cursor across an SVG canvas, centering itself on the pointer’s coordinates. The example demonstrates React state management to track mouse movement, updating the circle’s position on every move event. It uses React’s `useState` and `useCallback` hooks alongside D3 v6 for the SVG rendering, with an initial circle centered at 480, 250. The visualization responds interactively in real time, showcasing a minimal integration of React and D3 for dynamic graphics.

AI-generated description

A program that follows your mouse with a circle.