Mouse Follower
✓ Published1🌍 Public
A single circle follows the mouse cursor in real time across an SVG canvas. The circle’s position updates directly from pointer movement events, not from any external dataset. The example uses React’s `useState` hook to manage the live mouse coordinates, with an `onMouseMove` handler on the SVG element. D3.js v7 is loaded in the page, though the interaction relies entirely on React state updates and native SVG rendering. The SVG viewport is a fixed 960 by 500 pixels, and the circle has a radius of 30 pixels.
AI-generated descriptionA program that follows your mouse with a circle
MIT Licensed