Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

0cef532162934a94a6469c14646eff1f

Mouse Follower

0 stars1🌍 Public
DDeborahVdeV
Last edited Mar 12, 2021
Created on Mar 12, 2021

An interactive SVG circle in yellow follows the mouse pointer inside a 960×500 pixel viewport, updating its center coordinates in real time. Built with React and ReactDOM, it uses the `useCallback` hook to handle the SVG `onMouseMove` event, reading `clientX` and `clientY` from the event to update state via `setMousePosition`. The circle's radius is fixed at 30 pixels.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.