Mouse Follower
✓ Published2🌍 Public
An interactive SVG visualization renders a single circle that follows the mouse cursor across a 960-by-500 canvas. The React component tracks pointer movement via the `onMouseMove` event and updates the circle’s `cx` and `cy` attributes through `useState` and `useCallback`. Initially positioned at the canvas center, the circle moves smoothly with the cursor. The example demonstrates state-driven rendering in React 17 with D3 v7, using plain SVG elements rather than data joins or scales. No external data source is involved; the visualization purely reacts to user input.
AI-generated descriptionA program that follows your mouse.
MIT Licensed