Skip to main content
100%

Fork of Mouse Follower

✓ Published0🌍 Public
Kkragovic
Last edited Mar 29, 2021
Created on Mar 29, 2021
Forked from Mouse Follower

A dark blue vertical rectangle follows the mouse cursor’s vertical position within an SVG canvas, using React’s `useState` and `useCallback` to update its `y` coordinate. The code renders a single `<rect>` element via ReactDOM, with `onMouseMove` handling pointer events. It uses static `width` and `height` constants (960×500) and fixed rectangle dimensions (30×100), with no external data—only the live mouse position.

AI-generated description

Smiley face implementation with React.

MIT Licensed

Similar vizzes