Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
AAndy Curtis
Last edited Aug 28, 2023
Created on Aug 28, 2023

A smiley face follows the mouse cursor across a full-screen SVG canvas. Clicking anywhere increases the circle's radius by one pixel. The example uses React's `useState` and `useCallback` hooks to manage the cursor position and radius state, with event handlers on the SVG element updating the component. It renders a single SVG circle, updating its `cx`, `cy`, and `r` attributes in response to mouse events.

AI-generated description

Smiley face implementation with React.

MIT Licensed

Similar vizzes