Skip to main content
100%

Mouse Follower

✓ Published0🌍 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

MIT Licensed

Similar vizzes