Fork of Mouse Follower
✓ Published0🌍 Public
A circle follows the mouse cursor across an SVG canvas, updating its position in real time. The React application uses a `useState` hook to track the cursor’s coordinates, and a `useCallback` event handler updates the circle’s `cx` and `cy` attributes on every mouse movement. Rendered with ReactDOM into an SVG element, the example relies on the `onMouseMove` event to capture pointer position, with the circle’s radius fixed at 30 pixels.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed