🌍 Public
Viewing a saved revision (read-only)
1f84be83f0b942bba0bf02bf974d594a
Circles React
This example shows 50 randomly sized and positioned circles moving horizontally across the screen, bouncing off the edges. A button toggles between sorting the circles by descending radius and reverting them to random positions. Built with React hooks and D3 v5, it uses `d3.range` to generate the initial data and a `d3.timer` loop to update both React state and SVG attributes (`cx`, `cy`). The circles are rendered as SVG elements, with the animation driven by state changes that update the DOM.
AI-generated descriptionSmiley face implementation with React & D3.