Circle following Mouse
✓ Published0🌍 Public
A circle follows the cursor’s position across a 960x500 SVG canvas. Built with React and D3 v7, the example uses an `onMouseMove` event handler on the `<svg>` element to capture mouse coordinates and update React state. The circle’s `cx` and `cy` attributes are bound to this state, causing the circle to continuously reposition as the mouse moves. The SVG is rendered via React’s `ReactDOM.render`, with the circle radius fixed at 30 pixels.
AI-generated descriptionhalf my towards a smiley face.
MIT Licensed