Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
DDaniel Zsido
Last edited Nov 15, 2021
Created on Nov 14, 2021
Forked from Simley Face Part I

A black circle follows the mouse cursor across an SVG canvas, serving as a playful interactive pointer. The example is built with React and D3 v7, using React state to track mouse coordinates via an `onMouseMove` event handler. The `useState` hook stores the current `clientX` and `clientY` positions, and a `<circle>` element updates its `cx` and `cy` attributes accordingly. The SVG's width and height are fixed, and the circle has a constant radius of 30 pixels.

AI-generated description

Half way towards a simley face.

MIT Licensed

Similar vizzes