Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

mouse follower

Public visualization

Viewing a saved revision (read-only)

b9d2067675774c47b9dd241b8b1d9e21

mouse follower

0 stars0🌍 Public
OOwen Thiele
Last edited Oct 4, 2021
Created on Oct 4, 2021

A yellow circle follows the mouse cursor inside an SVG canvas, updating its position in real time as the cursor moves. The example is built with React, using the `useState` hook to store mouse coordinates and an `onMouseMove` event handler on the SVG element to capture `clientX` and `clientY` values. The circle’s center is set to those coordinates, and the SVG’s width and height are fixed at 960 by 500 pixels.

AI-generated description

Smiley face implementation with React.