<InlineSvg> Component

The <InlineSvg> component renders an <svg> from a given string.

Share
Code Editor
<InlineSvg
src={`<svg width="300" height="200">
<rect width="100%" height="100%" fill="#000000" />
<circle cx="150" cy="100" r="80" fill="#1563ff" />
<text x="150" y="125" font-size="60" text-anchor="middle" fill="#ffffff">SVG</text>
</svg>`}
/>

Where it's used

0.x.x
Loading 0.x.x releases...
1.x.x
Loading 1.x.x releases...
2.x.x
Loading 2.x.x releases...
3.x.x
Loading 3.x.x releases...
4.x.x
Loading 4.x.x releases...
5.x.x
Loading 5.x.x releases...
6.x.x
Loading 6.x.x releases...

Props

NameDescription
src*
string
Serialized SVG string to render