Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

mouse pointer 1

Public visualization

Viewing a saved revision (read-only)

3ef01bf6767441edadec344497267d87

mouse pointer 1

0 stars1🌍 Public
Mmlscmoulika
Last edited May 22, 2021
Created on May 22, 2021

This example shows a single circle that follows the mouse pointer across a full-window SVG canvas. The circle uses the current mouse coordinates as its center, with a fixed radius of 40 pixels. The application tracks pointer movement through React's `useState` hook and an `onMouseMove` event handler, updating the circle's `cx` and `cy` attributes in real time. The visualization is rendered with React and SVG, using ReactDOM to mount the component, and initializes the circle at the center of the window.

AI-generated description

A program following mouse with a circle :))