TldrawImage
See source codeTable of contents
A renderered SVG image of a Tldraw snapshot.
Example
<TldrawImage
snapshot={snapshot}
pageId={pageId}
background={false}
darkMode={true}
bounds={new Box(0, 0, 600, 400)}
scale={1}
/>
Properties
Extends TLImageExportOptions
.
assetUrls
optional
Asset URL overrides.
assetUrls?: TLUiAssetUrlOverrides
background
optional
from TLImageExportOptions
background?: boolean
bindingUtils
optional
Additional binding utils to use.
bindingUtils?: readonly TLAnyBindingUtilConstructor[]
bounds
optional
from TLImageExportOptions
bounds?: Box
darkMode
optional
from TLImageExportOptions
darkMode?: boolean
format
optional
The image format to use. Defaults to 'svg'.
format?: 'png' | 'svg'
licenseKey
optional
The license key.
licenseKey?: string
padding
optional
from TLImageExportOptions
padding?: number
pageId
optional
The page to display. Defaults to the first page.
pageId?: TLPageId
preserveAspectRatio
optional
from TLImageExportOptions
preserveAspectRatio?: React.SVGAttributes<SVGSVGElement>['preserveAspectRatio']
scale
optional
from TLImageExportOptions
scale?: number
shapeUtils
optional
Additional shape utils to use.
shapeUtils?: readonly TLAnyShapeUtilConstructor[]
snapshot
The snapshot to display.
snapshot: Partial<TLEditorSnapshot> | TLStoreSnapshot
Prev
TldrawHandlesNext
TldrawScribble