Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

525f81bfb5b643d3af7535d619a67725

Mouse Follower

0 stars0🌍 Public
Eekmankaur
Last edited Oct 4, 2022
Created on Oct 4, 2022

A circle follows the mouse cursor across a 960-by-500 SVG canvas, updating its center position in real time. Built with React using the `useState` and `useCallback` hooks, the app listens for `onMouseMove` events on the SVG element and passes the cursor's `clientX`/`clientY` coordinates to the circle's `cx` and `cy` attributes. The visualization uses D3.js version 5 primarily for the SVG rendering within a React framework, with no external data source.

AI-generated description

A program that follows the mouse with a circle