🌍 Public
Viewing a saved revision (read-only)
42e50cf3bf854443b3f31ad043ca6410
Mouse follower
A yellow circle follows the mouse cursor across an SVG canvas. The circle's position updates in response to mouse movement, starting at the center of the 960 by 500 viewport. The example uses React’s `useState` and `useCallback` hooks to manage the cursor coordinates, with the SVG `onMouseMove` event triggering state updates. The circle is rendered as an SVG `<circle>` element, and the React DOM handles re-rendering on each move.
AI-generated descriptionA program that follows your mouse with a circle