Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

839696ce708a4e30927be66c69cf932c

Mouse Follower

0 stars1🌍 Public
DDavid
Last edited Mar 21, 2021
Created on Mar 21, 2021

A circle follows the mouse cursor across an SVG canvas, updating its position in real time as the pointer moves. Built with React, the app uses the `useState` hook to store the mouse coordinates and a `useCallback` handler triggered by the SVG's `onMouseMove` event. The circle is rendered as an SVG `<circle>` element with a fixed radius of 30 pixels. The viewport is set to 960 by 500 pixels, and the initial position is centered before any mouse movement occurs.

AI-generated description

A program that follows your mouse with a circle.