Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Circle following Mouse

Public visualization

Circle following Mouse

0 stars0🌍 Public
MMarcoAR1
Last edited Jun 12, 2021
Created on Jun 12, 2021
Forked from Smaile face part 1

A circle follows the cursor’s position across a 960x500 SVG canvas. Built with React and D3 v7, the example uses an `onMouseMove` event handler on the `<svg>` element to capture mouse coordinates and update React state. The circle’s `cx` and `cy` attributes are bound to this state, causing the circle to continuously reposition as the mouse moves. The SVG is rendered via React’s `ReactDOM.render`, with the circle radius fixed at 30 pixels.

AI-generated description

half my towards a smiley face.

Comments

Sign in to join the discussion.

MIT Licensed