Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse follower

Public visualization

Viewing a saved revision (read-only)

cdb1f4bcda724a9a82b8c9e72edf6a70

Mouse follower

0 stars1🌍 Public
UUnknown-bot-sus
Last edited Jan 13, 2022
Created on Jan 13, 2022

A circle follows the mouse cursor across an SVG canvas, updating its position in real time. The example demonstrates React state management with a `useState` hook and the `onMouseMove` event handler, which captures the cursor's client coordinates and passes them to the circle's `cx` and `cy` attributes. React re-renders the SVG element on each mouse movement, while D3's `arc` import is present but unused, and no external data source is involved.

AI-generated description

A program that follows your mouse with a circle