Mouse Follower
✓ Published1🌍 Public
A circle follows the mouse cursor across an SVG canvas. React state tracks the pointer position, updating on every `mousemove` event, and re-renders the circle's `cx` and `cy` coordinates accordingly. The example uses React 17 with hooks (`useState`, `useCallback`) and renders through `ReactDOM`. D3 v7 is loaded but not directly used. The SVG has a fixed width of 960 pixels and height of 560 pixels, with the circle initially centered at the canvas midpoint.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed