Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Buddy

Public visualization

Viewing a saved revision (read-only)

2414f789cb4c4b1496f7ed9cc2306177

Mouse Buddy

0 stars0🌍 Public
Gguitmonk-1290
Last edited May 7, 2023
Created on May 7, 2023
Forked from D3 Starter

A single gray circle tracks the mouse cursor in real time within an SVG canvas. The visualization shows how React state updates can drive direct SVG element positioning. The `App` component captures mouse coordinates via the SVG `onMouseMove` handler, stores them with `useState`, and re-renders the circle’s `cx` and `cy` attributes on every movement. Built with React 18 and D3 v7, the example renders purely through SVG elements without additional data sources or animation logic.

AI-generated description

Mouse Follower