Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
TTyler Durham
Last edited May 1, 2022
Created on May 1, 2022
Forked from Smiley Face Part 1

A black circle follows the mouse cursor across a green SVG canvas, responding instantly to pointer movement. The visualization uses React’s `useState` and `useCallback` hooks to track the mouse position and update the circle’s `cx` and `cy` attributes. The SVG element’s `onMouseMove` event handler captures the cursor coordinates, while D3’s `arc` module is imported but unused. The example demonstrates a simple interactive pattern combining React state management with SVG rendering.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes