Skip to main content
100%

Mouse Follower

✓ Published1🌍 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

MIT Licensed

Similar vizzes