Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
Mmaxthamt
Last edited Mar 12, 2021
Created on Mar 12, 2021

A single circle follows the mouse cursor across an SVG canvas, responding in real time to pointer movement. The example demonstrates integrating D3.js with React hooks, using React's `useState` to track mouse coordinates and `useCallback` to handle the `mousemove` event. D3's `arc` API is imported but not used in the visible logic. The circle's position updates directly from the browser's `clientX` and `clientY` values, rendered as a simple SVG `<circle>` element without animation or data binding.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes