Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
JJosephStalnaker
Last edited Jun 27, 2021
Created on Jun 27, 2021

This example renders a single black-outlined circle on a blank SVG canvas that follows the user’s mouse movements. The circle’s center updates to the current cursor coordinates, which are captured from the mouse event’s `clientX` and `clientY` properties. Built with React and ReactDOM, the application uses the `useState` hook to store the mouse position and an `onMouseMove` handler to trigger re-renders, drawing the circle with SVG elements.

AI-generated description

Follow mouse circle

MIT Licensed

Similar vizzes