MouseFollower
✓ Published1🌍 Public
A circle follows the mouse cursor across an SVG canvas in real time. The React component tracks pointer coordinates through the SVG `onMouseMove` event handler, updating the circle’s `cx` and `cy` attributes. Using React hooks like `useState` and `useCallback`, the app re-renders only on cursor movement, while D3 v5 is loaded but unused in this minimal interaction. The initial mouse position is centered at (480, 250) within a 960 by 500 viewport, with the circle’s radius set to 30 pixels.
AI-generated descriptionA program tha follows your mouse with a circle
MIT Licensed