TldrawImage
Table 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 TLSvgOptions
.
from
TLSvgOptions
background?: boolean
Additional binding utils to use.
bindingUtils?: readonly TLAnyBindingUtilConstructor[]
from
TLSvgOptions
bounds?: Box
from
TLSvgOptions
darkMode?: boolean
The image format to use. Defaults to 'svg'.
format?: 'png' | 'svg'
The license key.
licenseKey?: string
from
TLSvgOptions
padding?: number
The page to display. Defaults to the first page.
pageId?: TLPageId
from
TLSvgOptions
preserveAspectRatio?: React.SVGAttributes<SVGSVGElement>['preserveAspectRatio']
from
TLSvgOptions
scale?: number
Additional shape utils to use.
shapeUtils?: readonly TLAnyShapeUtilConstructor[]
The snapshot to display.
snapshot: Partial<TLEditorSnapshot> | TLStoreSnapshot