Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

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.

Comments

Sign in to join the discussion.

MIT Licensed