Simple line
1 svg2 width 8003 height 4504 viewBox 0 0 21.813 23.4535 line6 x1 207 y1 208 x2 1209 y2 2010 stroke black11 data-name alfio
<?xml version="1.0"?>
<svg xmlns='http://www.w3.org/2000/svg' width='800' height='450' viewBox='0 0 21.813 23.453'>
<line dataName='alfio' stroke='black' x1='20' y1='20' x2='120' y2='20' style='stroke:black;'></line>
</svg>
rect shape
1 svg2 rect
<?xml version="1.0"?>
<svg xmlns='http://www.w3.org/2000/svg'>
<rect></rect>
</svg>
circle shape
1 svg2 circle
<?xml version="1.0"?>
<svg xmlns='http://www.w3.org/2000/svg'>
<circle></circle>
</svg>
rect shape
1 svg2 rect
<?xml version="1.0"?>
<svg xmlns='http://www.w3.org/2000/svg'>
<rect></rect>
</svg>
circle shape
1 svg2 circle
<?xml version="1.0"?>
<svg xmlns='http://www.w3.org/2000/svg'>
<circle></circle>
</svg>
Using defs and xlink:ref
1 svg2 @ aria-hidden true3 class h-3.5 w-3.5 rounded-full mr-24 xmlns http://www.w3.org/2000/svg5 xmlns:xlink http://www.w3.org/1999/xlink6 id flag-icon-css-cn7 viewBox 0 0 512 5128 defs9 path10 id a11 fill #ffde0012 d M1-.3L-.7.8 0-1 .6.8-1-.3z13 path14 fill #de291015 d M0 0h512v512H0z16 use17 @ width 3018 @ height 2019 @ transform matrix(76.8 0 0 76.8 128 128)20 @ xlink:href #a21 use22 @ width 3023 @ height 2024 @ transform rotate(-121 142.6 -47) scale(25.5827)25 @ xlink:href #a26 use27 @ width 3028 @ height 2029 @ transform rotate(-98.1 198 -82) scale(25.6)30 @ xlink:href #a31 use32 @ width 3033 @ height 2034 @ transform rotate(-74 272.4 -114) scale(25.6137)35 @ xlink:href #a36 use37 @ width 3038 @ height 2039 @ transform matrix(16 -19.968 19.968 16 256 230.4)40 @ xlink:href #a
<?xml version="1.0"?>
<svg id='flag-icon-css-cn' class='h-3.5 w-3.5 rounded-full mr-2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' aria-hidden='true'>
<defs>
<path id='a' fill='#ffde00' d='M1-.3L-.7.8 0-1 .6.8-1-.3z'></path>
</defs>
<path fill='#de2910' d='M0 0h512v512H0z'></path>
<use width='30' height='20' transform='matrix(76.8 0 0 76.8 128 128)' xlink:href='#a'></use>
<use width='30' height='20' transform='rotate(-121 142.6 -47) scale(25.5827)' xlink:href='#a'></use>
<use width='30' height='20' transform='rotate(-98.1 198 -82) scale(25.6)' xlink:href='#a'></use>
<use width='30' height='20' transform='rotate(-74 272.4 -114) scale(25.6137)' xlink:href='#a'></use>
<use width='30' height='20' transform='matrix(16 -19.968 19.968 16 256 230.4)' xlink:href='#a'></use>
</svg>
Shape with css styles
1 svg2 width 8993 height 8684 viewBox 0 0 1200 12005 fill none6 xmlns http://www.w3.org/2000/svg7 class css-1i6zs058 ::style9 css10 . year11 fill #00ff0012 @ dominant-baseline middle13 @ text-anchor middle14 . legend15 fill #00000016 @ dominant-baseline middle17 @ text-anchor middle18 font-size 13px
<?xml version="1.0"?>
<svg class='css-1i6zs05' xmlns='http://www.w3.org/2000/svg' fill='none' width='899' height='868' viewBox='0 0 1200 1200'>
<style>
/*
artifact generator: /app/node_modules/@wizzi/plugin.css/lib/artifacts/css/document/gen/main.js
package: @wizzi/[email protected]
primary source IttfDocument: json:/index.svg.ittf
utc time: Tue, 06 May 2025 04:11:17 GMT
*/
.year {
fill: #00ff00;
dominant-baseline: middle;
text-anchor: middle;
}
.legend {
fill: #000000;
dominant-baseline: middle;
text-anchor: middle;
font-size: 13px;
}
</style>
</svg>
Shape with script
1 svg2 # Svg can be scripted3 rect4 x 205 y 306 width 1007 height 508 stroke blue9 fill yellow10 ::script11 module12 kind es613 function sum14 param a15 param b16 return a + b17 _ sum(2, 2)
<?xml version="1.0"?>
<svg xmlns='http://www.w3.org/2000/svg'>
<rect fill='yellow' stroke='blue' x='20' y='30' width='100' height='50' style='stroke:blue;'>
<script>
/*
artifact generator: /app/node_modules/@wizzi/plugin.js/lib/artifacts/js/module/gen/main.js
package: @wizzi/[email protected]
primary source IttfDocument: json:/index.svg.ittf
utc time: Tue, 06 May 2025 04:11:17 GMT
*/
function sum(a, b) {
return a + b;
}
sum(2, 2);
</script>
</rect>
</svg>