Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

mouse follower

Public visualization

Viewing a saved revision (read-only)

9687674fcbd5449898c2387ba12f441e

mouse follower

0 stars0🌍 Public
Mmk3737
Last edited Mar 25, 2022
Created on Mar 25, 2022

A circle follows the mouse pointer across an SVG canvas, updating its center position in real time to mirror the cursor's location. The React component uses a `useState` hook to track mouse coordinates and a `useCallback` handler on the SVG element's `onMouseMove` event. The circle is rendered with a D3.js arc path, though the simple shape relies on React's declarative SVG attributes for positioning, with no external data source.

AI-generated description

this is to build a circle following your mouse pointer