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
TTheOutstandingDinosaur
Last edited Aug 15, 2024
Created on Aug 15, 2024

A single gray circle tracks the user's cursor across the full browser window, moving smoothly to reflect the mouse's current x and y coordinates. Built with React hooks (`useState` and `useCallback`), the application listens for `onMouseMove` events on an SVG element and updates the circle's `cx` and `cy` attributes. The rendering is handled entirely through React's virtual DOM and SVG, with no external data sources or animation libraries involved.

AI-generated description

A programme that follows the mouse

Comments

Sign in to join the discussion.

MIT Licensed