Skip to main content
100%

Mouse Follower

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

MIT Licensed

Similar vizzes