Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

a1db383219114b83af59495100cd4ffa

Mouse Follower

0 stars0🌍 Public
TTousifAhamed
Last edited Sep 14, 2021
Created on Sep 14, 2021

A yellow circle with a black outline follows the mouse cursor across a 960-by-500 SVG canvas. The example uses React's `useState` and a callback to track the cursor's `clientX` and `clientY` coordinates, updating the circle's `cx` and `cy` attributes directly on mouse movement. This demonstrates interactive SVG rendering within a React component, with the circle’s position driven entirely by user input.

AI-generated description

A program that follows your mouse with a circle.