Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars0🌍 Public
Aabreeson
Last edited Jul 13, 2021
Created on Jul 13, 2021

A single black circle tracks the mouse in real time within an SVG canvas. The example uses React's `useState` and `useCallback` hooks to capture the mouse position via the SVG `onMouseMove` event, updating the circle's `cx` and `cy` attributes. The visualization demonstrates a minimal interactive pattern, relying on React for state management and D3 v5 only for SVG rendering support, with no data source beyond the live pointer coordinates.

AI-generated description

A programme that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed