Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
JJaewoo Chung
Last edited Dec 10, 2021
Created on Dec 10, 2021

A circle follows the mouse cursor in real time across an SVG canvas, highlighting the immediate connection between pointer movement and visual feedback. The visualization uses React state management, with a `useState` hook tracking the cursor's `clientX` and `clientY` coordinates, which are updated via a callback on the SVG's `onMouseMove` event. Rendered with React’s `ReactDOM.render`, the circle’s position transitions smoothly as the state changes, while D3.js is loaded but not actively used in the logic. The example demonstrates a simple, responsive interaction pattern.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes