Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower And Resizer

Public visualization

Mouse Follower And Resizer

0 stars1🌍 Public
FFlorian Maas
Last edited Feb 23, 2022
Created on Feb 23, 2022

A green circle follows the mouse cursor across a full-screen SVG canvas. Clicking the mouse grows the circle’s radius by 10 pixels, while shift-clicking shrinks it, with a minimum size of zero. Built with React components and event handlers, the code uses React’s `useState` and `useCallback` hooks to track mouse position and radius, rendering the circle via SVG elements and updating on each mouse event.

AI-generated description

Follow the mouse and resize.

Comments

Sign in to join the discussion.

MIT Licensed