Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower (JM copy)

Public visualization

Mouse Follower (JM copy)

0 stars2🌍 Public
Jjeffmesie
Last edited Aug 23, 2021
Created on Aug 23, 2021
Forked from Mouse Follower

This example shows a simple interactive visualization: a red circle echoes the user’s mouse position within an SVG canvas. The circle responds in real time, maintaining its center exactly where the cursor moves over the 960×500 display. Built with React, the app uses the `useState` hook to store the cursor’s coordinates and a `useCallback` handler to update them on each mouse event. Mouse movement data comes from the `onMouseMove` event, which captures the `clientX` and `clientY` properties.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed