Skip to main content
Built-in Elements

<schematicgraphic />

Overview

<schematicgraphic /> embeds a standalone SVG inside a <schematicsheet />. Provide svgContent, imageUrl, or both; other image formats are not supported.

const svg =
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 20">' +
'<circle cx="20" cy="10" r="8" fill="#dbeafe" stroke="#1d4ed8" />' +
'</svg>'

export default () => (
<board routingDisabled>
<schematicsheet name="Overview">
<schematicgraphic svgContent={svg} width="40mm" height="20mm" />
</schematicsheet>
</board>
)
Schematic Circuit Preview

Props

PropTypeRequiredDescription
imageUrlstringOne source requiredCanonical standalone SVG URL, data URL, or project asset. When both sources are provided, a failed non-data URL load falls back to svgContent.
svgContentstringOne source requiredComplete inline SVG markup, or fallback content when imageUrl is also provided.
widthdistanceNoPositive rendered width.
heightdistanceNoPositive rendered height.

Include xmlns and preferably a viewBox in the SVG root for predictable rendering and sizing.

PDF export

The current tsci schematic PDF export may omit <text> elements nested inside an embedded SVG. Convert important SVG labels to paths when they must appear in the exported PDF.