Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars0🌍 Public
CChristian Rohrer
Last edited Jan 27, 2023
Created on Jan 27, 2023

A single red circle follows the cursor across the entire browser viewport. The circle is rendered as an SVG `<circle>` element, with its center coordinates updated on every mouse move event. Built with React (using `useState` and `useCallback`) and rendered with `ReactDOM.render`, the application listens for `onMouseMove` on a full-window SVG and sets the circle’s `cx` and `cy` properties to the event’s client coordinates. The viewport dimensions are taken from `window.innerWidth` and `window.innerHeight`.

AI-generated description

Smiley face implementation with React.

Comments

Sign in to join the discussion.

MIT Licensed