Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Circle Following your Cursor

Public visualization

Viewing a saved revision (read-only)

8a881bb3be0a4b49a8333ed5a40e789b

Circle Following your Cursor

0 stars1🌍 Public
MManbirJudge
Last edited Oct 17, 2021
Created on Oct 17, 2021

A circle tracks the user’s cursor across a full-screen SVG canvas, updating its center position in real time. Built with React 16.9 and SVG, the component uses the `useState` hook to store mouse coordinates and `useCallback` with an `onMouseMove` handler to capture `clientX` and `clientY` events. The circle’s `cx` and `cy` attributes are bound to this state, causing a smooth, reactive movement that mirrors the pointer exactly.

AI-generated description

Smiley face implementation with React.