Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Folower

Public visualization

Viewing a saved revision (read-only)

1d6d86d9138d40d99e852daabf31f523

Mouse Folower

0 stars1🌍 Public
FFulvio Vigilante
Last edited Jul 14, 2021
Created on Jul 14, 2021

This example demonstrates a simple interactive visualization where a circle follows the mouse cursor across the entire browser window. Built with React and rendered as an SVG, the app uses the `useState` and `useCallback` hooks to track mouse coordinates from `onMouseMove` events and update the circle’s `cx` and `cy` attributes. The circle is initially centered on the screen and moves smoothly in response to cursor movement, with its radius fixed at 30 pixels.

AI-generated description

A program that follow your mouse with a circle.