SvgExportContext

See source code
Table of contents
interface SvgExportContext {}

Properties

isDarkMode

readonly

Whether the export should be in dark mode.

readonly isDarkMode: boolean

Methods

addExportDef

Add contents to the <defs> section of the export SVG. Each export def should have a unique key. If multiple defs come with the same key, only one will be added.

Parameters

NameDescription

def

Returns

void

waitUntil

Cause the SVG export to be delayed until the returned promise is resolved. This is useful if e.g. your shape loads data dynamically, and you need to prevent the export from happening until after the data is loaded.

See also the useDelaySvgExport hook, which may be a more convenient way to use this method depending on your use-case.

Parameters

NameDescription

promise

Promise<void>

Returns

void

Prev
SnapData
Next
SvgExportDef