Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

4686888b680d4a8d8fb970d4aadd63dd

Mouse Follower

0 stars1🌍 Public
RRajat Dangat
Last edited Mar 25, 2021
Created on Mar 25, 2021

A circle follows the mouse cursor across an SVG canvas, with its position updating in real time to mirror the pointer’s coordinates. The example uses React state and a `useCallback` event handler to capture mouse movements and re-render the circle’s `cx` and `cy` attributes. Rendered as an SVG element via ReactDOM, the visualization demonstrates a simple interactive binding between user input and graphical output, leveraging D3 v5 only for the underlying scripting environment.

AI-generated description

A program that follows your mouse with a circle.