Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

038cec816f064760bc17bcee15722358

Mouse Follower

0 stars0🌍 Public
Nnkmwambs
Last edited Jul 1, 2022
Created on Jul 1, 2022

A yellow circle follows the mouse cursor inside an SVG canvas. The example demonstrates React state management with a `useState` hook to track the cursor's `clientX` and `clientY` coordinates, updating on every `onMouseMove` event. The app renders a single `<circle>` element with a radius of 30, initially centered at a fixed midpoint, and uses React's `useCallback` to optimize the handler. Built with React 16.9 and D3 v5, the rendering relies entirely on SVG output without external data sources.

AI-generated description

A program that follows your mouse with a circle