Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

5ee61e0f5e2344afa709926433e26c12

Mouse Follower

0 stars1🌍 Public
Yyjhouma
Last edited Jan 28, 2022
Created on Jan 28, 2022

A circle follows the mouse cursor across an SVG canvas, updating its position in real time. The visualization is built with React and D3 v6, using React's `useState` and `useCallback` hooks to track and update the mouse coordinates from the `onMouseMove` event. The circle is rendered as an SVG element with a fixed radius, and its `cx` and `cy` attributes are bound to the current mouse position. The example demonstrates a simple interactive pattern in a React-D3 integration.

AI-generated description

A program that follows your mouse with a circle