Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

35450ca4302e4ecbbe7ad8751627c57f

Mouse Follower

0 stars1🌍 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