Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars0🌍 Public
Aamandaweisbrod18@gmail.com
Last edited Apr 14, 2025
Created on Apr 14, 2025

A circle follows the mouse cursor across an SVG canvas, with a black outline appearing when the cursor enters the drawing area and disappearing when it leaves. The React application uses the `useState` hook to track mouse coordinates and stroke color, updating the circle’s position via the `onMouseMove` event handler on the SVG element. The code renders the circle purely with React and SVG, relying on clientX and clientY from the mouse event for positioning.

AI-generated description

Following your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed