Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

1c3d34ba812d4c02957e2a645e25b416

Mouse Follower

0 stars1🌍 Public
Bboreilly26
Last edited Dec 29, 2021
Created on Dec 29, 2021

A circle follows the mouse cursor as it moves across an SVG canvas. The React component tracks pointer coordinates via the `onMouseMove` event and updates the circle’s `cx` and `cy` attributes through `useState` and `useCallback`. Rendered with D3 v5’s SVG helpers within React 16.9, the example demonstrates real-time state-driven positioning without external data.

AI-generated description

A program that creates a circle that follows your mouse.