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
AAbdulhaq Adetunji Salako
Last edited Aug 6, 2020
Created on Aug 6, 2020

A full-screen React SVG tracks the cursor with a single black circle, centering the circle on the mouse position as it moves. The app uses React's `useState` and `useCallback` hooks to manage and update the mouse coordinates, which are rendered as the `cx` and `cy` attributes of an SVG `<circle>` element. The circle has a fixed radius of 30 pixels, and the SVG canvas spans the entire browser window, with the initial mouse position set to the center of the viewport.

AI-generated description

A program that follow your mouse with a circle

Comments

Sign in to join the discussion.

MIT Licensed