Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Ssumaiyamahin
Last edited Sep 26, 2020
Created on Sep 26, 2020
Forked from HTML Starter

This example demonstrates how to create basic geometric shapes using SVG elements within a React application, styled with CSS. It shows circles, rectangles, lines, and paths rendered on an SVG canvas with fixed dimensions. The code uses raw SVG markup for circles and rectangles, applying inline fill colors like red and green, while grouping elements with `<g>` tags to apply shared styling attributes such as fill and stroke. A purple stroke with a thick stroke-width highlights the line and path elements. The accompanying CSS file sets body margins to zero and hides overflow.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes