Skip to main content
100%

Mouse Follower

✓ Published2🌍 Public
RRoland
Last edited Feb 4, 2022
Created on Feb 4, 2022
Forked from HTML Starter

This example demonstrates a simple interactive visualization where a circle follows the mouse cursor across the screen. The circle’s position updates in real-time as the user moves the mouse, with its center coordinated to the cursor’s coordinates. The code uses React with the `useState` and `useCallback` hooks for state management, and renders the circle as an SVG element. The `onMouseMove` event handler captures the cursor position and updates the circle’s `cx` and `cy` attributes.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes