Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

b52475664a474fc58456689114c87082

Mouse Follower

0 stars0🌍 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.