Skip to main content
Public

Share visualization

Loading preview…

Mouse Follower

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Mouse Follower

1
MMilena Belianovich Holtman
Last edited Oct 12, 2022
Created on Oct 12, 2022

This example shows a yellow circle with a black outline that follows the mouse cursor across an SVG canvas. On every mouse move, the circle’s center position updates to the cursor’s current coordinates. The visualization is built with React, using the `useState` hook to track the mouse position and the `useCallback` hook to handle the `onMouseMove` event, rendering the circle as an SVG `<circle>` element.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed