Skip to main content
100%

Mouse & Touch Follow

✓ Published0🌍 Public
Zzach b.
Last edited Apr 29, 2023
Created on Apr 29, 2023

A red circle follows the mouse pointer across an SVG canvas, with its radius dynamically linked to touch contact size when interacting via touchscreen. Built with React and ReactDOM, the visualization uses state management via `useState` and `useCallback` hooks to update the circle’s position on mouse and touch events. The code imports React 16.9 from a UMD bundle and renders fully client-side, displaying the current touch radius as text while the circle responds to pointer movement.

AI-generated description

A circle follows your mouse.

Episode 14

MIT Licensed

Similar vizzes