Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse follower

Public visualization

Viewing a saved revision (read-only)

39f44ed6581a4380a9b47e64aa714249

Mouse follower

0 stars1🌍 Public
MmohitPassan
Last edited Apr 24, 2021
Created on Apr 24, 2021
Forked from React starter

A single gray circle follows the mouse pointer across an SVG canvas. The example uses React state to track the cursor’s clientX and clientY coordinates on every mousemove event, updating the circle’s cx and cy attributes accordingly. Rendered as an SVG circle with a fixed radius, it starts at the center of a 960×500 viewport. The implementation combines React’s useCallback and useState hooks with D3.js v6, though D3 is only loaded and not actively used in the logic.

AI-generated description

Circle as a mouse follower