Mouse Follower
✓ Published0🌍 Public
The example displays a single gray circle that tracks the mouse cursor across an SVG canvas. Mouse movement triggers a React state update, repositioning the circle’s center coordinates. The code uses React’s `useState` and `useCallback` hooks within an SVG `onMouseMove` handler, while D3 v5 is loaded but unused. Rendering is handled by ReactDOM, with a fixed viewport of 960 by 500 pixels and a circle radius of 30.
AI-generated descriptionA programm that follows you mouse with a circle.
MIT Licensed