Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
TTulioChiodi
Last edited May 13, 2021
Created on May 13, 2021

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 description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes