Mouse Follower
✓ Published1🌍 Public
This example shows a yellow circle that follows the mouse cursor across the full browser window. It uses React's `useState` and `useCallback` to track mouse coordinates, which are passed to an SVG circle's `cx` and `cy` attributes. The circle has a fixed radius of 30 pixels and is rendered on an SVG canvas sized to the window's dimensions. The `onMouseMove` event handler updates the circle's position in real time, and the SVG is rendered through ReactDOM.
AI-generated descriptionA program that follows my mouse with a circle
MIT Licensed