Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

07d1ab98287f47029553dc61260427d5

Mouse Follower

0 stars1🌍 Public
BBen Brophy
Last edited Dec 29, 2021
Created on Dec 29, 2021
Forked from Smiley Face Part 1

A single circle follows the mouse cursor in real time across an SVG canvas. The circle’s position updates directly from pointer movement events, not from any external dataset. The example uses React’s `useState` hook to manage the live mouse coordinates, with an `onMouseMove` handler on the SVG element. D3.js v7 is loaded in the page, though the interaction relies entirely on React state updates and native SVG rendering. The SVG viewport is a fixed 960 by 500 pixels, and the circle has a radius of 30 pixels.

AI-generated description

A program that follows your mouse with a circle