Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
Ggujjapooja7@gmail.com
Last edited May 7, 2023
Created on May 7, 2023
Forked from HTML Starter

This example shows an SVG circle that follows the mouse pointer as it moves over a 960×500 canvas. The circle is positioned by updating its `cx` and `cy` coordinates based on the `clientX` and `clientY` values from the mouse event. Built with React and ReactDOM, the app uses a `useState` hook to store the current pointer position and a `useCallback` handler to update it on each mouse movement. The rendering is done entirely with SVG, with a fixed circle radius of 30 pixels.

AI-generated description

A program that follows the mouse with a circle.

MIT Licensed

Similar vizzes