DOM elements
<svg>
Use SVG JSX for vector graphics, with DOM property spellings such as strokeWidth. Provide a text alternative for meaningful graphics and hide decorative icons.
Formal Syntax & Structure
react syntaxreact
<svg ... />Working Example
Example Snippetreact
export default function App(){return <p><svg aria-hidden='true' width='20' height='20' viewBox='0 0 20 20'><path d='M3 10 L8 15 L17 4' fill='none' stroke='currentColor' strokeWidth='2'/></svg>In stock</p>}