Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

579de1147632483fb87c1faf336bc392

Mouse Follower

0 stars0🌍 Public
LLeandro Da Souza
Last edited Mar 22, 2021
Created on Mar 22, 2021

A full-screen SVG circle follows the user's mouse in real time, updating its center position with every pointer movement. The example shows React state management driving SVG rendering, where the circle's `cx` and `cy` attributes are bound to the current mouse coordinates tracked via `onMouseMove`. The code uses React's `useState` and `useCallback` hooks within a functional component, rendering through `ReactDOM.render`. No data source is involved; the visual is purely interactive, with the circle radius fixed at 30 pixels and initial position centered on the viewport.

AI-generated description

Mouse Follower hehe