Skip to main content
100%

Mouse Follower

✓ Published0🌍 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

MIT Licensed

Similar vizzes