Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

788a61940abc4904ba4d5b07c919fd66

Mouse Follower

0 stars0🌍 Public
Hhashemalkak
Last edited Oct 12, 2020
Created on Oct 12, 2020

A circle follows the mouse cursor across an SVG canvas, updating its position in real time. The visualization uses React state management with the `useState` hook to track mouse coordinates, which are captured via the SVG element's `onMouseMove` event handler. The circle is rendered as an SVG `<circle>` element, with its `cx` and `cy` attributes bound to the current mouse position. The example demonstrates simple interactive rendering in React, with no external data sources, relying solely on user input to drive the visualization.

AI-generated description

A program that follows your mouse with a circle