Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Eelia-dot
Last edited Oct 5, 2021
Created on Oct 5, 2021
Forked from HTML smile face

A circle follows the cursor across an SVG canvas, updating its position in real time as the mouse moves. Built with React and D3 v7, the visualization uses React's `useState` hook to store the mouse coordinates and a `useCallback` handler to update them on every `onMouseMove` event. The circle is rendered as an SVG `<circle>` element, with its `cx` and `cy` attributes bound directly to the current mouse position, creating a smooth, direct response to user input.

AI-generated description
MIT Licensed

Similar vizzes