Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
FFrederick O'Brien
Last edited Nov 3, 2021
Created on Nov 3, 2021
Forked from Smiley Face

A yellow circle follows the mouse cursor across an SVG canvas, with its position updating in real time as the pointer moves. The React component uses the `useState` and `useCallback` hooks to track mouse coordinates via an `onMouseMove` event handler, rendering the circle with dynamic `cx` and `cy` attributes. Built with React 17 and D3 v7, the example demonstrates a simple interactive data-binding pattern without external data sources.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes