Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse follower

Public visualization

Mouse follower

0 stars1🌍 Public
FFrederick O'Brien
Last edited Nov 3, 2021
Created on Nov 3, 2021
Forked from Smiley Face

A yellow circle follows the mouse cursor across an SVG canvas, with its position updating in real time as the pointer moves. The React component uses the `useState` and `useCallback` hooks to track mouse coordinates via an `onMouseMove` event handler, rendering the circle with dynamic `cx` and `cy` attributes. Built with React 17 and D3 v7, the example demonstrates a simple interactive data-binding pattern without external data sources.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed