Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
TtrwMK
Last edited Oct 10, 2022
Created on Oct 10, 2022

This example shows a single circle that follows the mouse cursor across the full browser window. The circle’s position updates live through React state, using the `clientX` and `clientY` values from the `onMouseMove` event on an SVG element. The code renders the circle as an SVG `<circle>` with React 16.9, and the state hook `useState` manages the cursor coordinates. The visualization demonstrates a simple interactive mapping between pointer movement and SVG shape placement.

AI-generated description

A Program that follows your mouse with a circle

Comments

Sign in to join the discussion.

MIT Licensed