Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

b50bd588f6264568aa3c20b01ac71a63

Mouse Follower

0 stars0🌍 Public
IIlyas Filali
Last edited Sep 15, 2022
Created on Sep 15, 2022

A circle follows the cursor within an SVG canvas. The React application tracks mouse movement through the `onMouseMove` event handler, updating the circle's center coordinates via the `useState` hook. The circle moves responsively across a 700 by 500 pixel space, rendered using SVG markup. The `mousePosition` state is initialized at the canvas center before any user interaction.

AI-generated description

Smiley face implementation with React.

A program that follows your mouse with a circle