Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
Nnkmwambs
Last edited Jul 1, 2022
Created on Jul 1, 2022

A yellow circle follows the mouse cursor inside an SVG canvas. The example demonstrates React state management with a `useState` hook to track the cursor's `clientX` and `clientY` coordinates, updating on every `onMouseMove` event. The app renders a single `<circle>` element with a radius of 30, initially centered at a fixed midpoint, and uses React's `useCallback` to optimize the handler. Built with React 16.9 and D3 v5, the rendering relies entirely on SVG output without external data sources.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes