dv2020-ep14-viz14 - Mouse Follow
✓ Published2🌍 Public
A circle follows the mouse as it moves over an SVG canvas. The visualization tracks the cursor’s client coordinates and updates the circle’s center position in real time. Built with React hooks (`useState` and `useCallback`), it handles mouse movement via the SVG `onMouseMove` event, re-rendering the circle’s `cx` and `cy` attributes. The example uses React 16.9 and ReactDOM for rendering, with a static SVG viewport of 960 by 500 pixels.
AI-generated descriptionA circle follows your mouse.
MIT Licensed