Overlapping Circles
Two overlapping yellow circles with black outlines form a simple abstract composition. The example demonstrates using React with JSX to generate SVG circles, replacing static HTML markup with dynamic JavaScript calculations for positioning and sizing. The code defines constants for dimensions, offsets, and stroke width, then renders three circles—two offset horizontally and one centered—using ReactDOM to mount the component into the DOM. This illustrates how React’s declarative approach enables reusable, parameterized SVG elements.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
Half way towards a smiley face -- we used CSS to make the margins and the colors. We used SVG to make the circles. Feeling frustrated that we couldn't use math to define the DOM structure and use JSX to write HTML in JS and math from JS