TldrawOptions
See source codeTable of contents
- actionShortcutsLocation
- adjacentShapeMargin
- animationMediumMs
- cameraMovingTimeoutMs
- cameraSlideFriction
- coarseDragDistanceSquared
- coarseHandleRadius
- coarsePointerWidth
- collaboratorCheckIntervalMs
- collaboratorIdleTimeoutMs
- collaboratorInactiveTimeoutMs
- createTextOnCanvasDoubleClick
- defaultSvgPadding
- doubleClickDurationMs
- dragDistanceSquared
- edgeScrollDelay
- edgeScrollDistance
- edgeScrollEaseDuration
- edgeScrollSpeed
- exportProvider
- flattenImageBoundsExpand
- flattenImageBoundsPadding
- followChaseViewportSnap
- gridSteps
- handleRadius
- hitTestMargin
- laserDelayMs
- longPressDurationMs
- maxExportDelayMs
- maxFilesAtOnce
- maxPages
- maxPointsPerDrawShape
- maxShapesPerPage
- multiClickDurationMs
- temporaryAssetPreviewLifetimeMs
- textShadowLod
- Properties
Options for configuring tldraw. For defaults, see defaultTldrawOptions.
interface TldrawOptions {}
Example
const options: Partial<TldrawOptions> = {
maxPages: 3,
maxShapesPerPage: 1000,
}
function MyTldrawComponent() {
return <Tldraw options={options} />
}
Properties
actionShortcutsLocation
readonly
readonly actionShortcutsLocation: 'menu' | 'swap' | 'toolbar'
adjacentShapeMargin
readonly
readonly adjacentShapeMargin: number
animationMediumMs
readonly
readonly animationMediumMs: number
cameraMovingTimeoutMs
readonly
readonly cameraMovingTimeoutMs: number
cameraSlideFriction
readonly
readonly cameraSlideFriction: number
coarseDragDistanceSquared
readonly
readonly coarseDragDistanceSquared: number
coarseHandleRadius
readonly
readonly coarseHandleRadius: number
coarsePointerWidth
readonly
readonly coarsePointerWidth: number
collaboratorCheckIntervalMs
readonly
readonly collaboratorCheckIntervalMs: number
collaboratorIdleTimeoutMs
readonly
readonly collaboratorIdleTimeoutMs: number
collaboratorInactiveTimeoutMs
readonly
readonly collaboratorInactiveTimeoutMs: number
createTextOnCanvasDoubleClick
readonly
readonly createTextOnCanvasDoubleClick: boolean
defaultSvgPadding
readonly
readonly defaultSvgPadding: number
doubleClickDurationMs
readonly
readonly doubleClickDurationMs: number
dragDistanceSquared
readonly
readonly dragDistanceSquared: number
edgeScrollDelay
readonly
readonly edgeScrollDelay: number
edgeScrollDistance
readonly
readonly edgeScrollDistance: number
edgeScrollEaseDuration
readonly
readonly edgeScrollEaseDuration: number
edgeScrollSpeed
readonly
readonly edgeScrollSpeed: number
exportProvider
readonly
The react provider to use when exporting an image. This is useful if your shapes depend on
external context providers. By default, this is React.Fragment
.
readonly exportProvider: ComponentType<{
children: React.ReactNode
}>
flattenImageBoundsExpand
readonly
readonly flattenImageBoundsExpand: number
flattenImageBoundsPadding
readonly
readonly flattenImageBoundsPadding: number
followChaseViewportSnap
readonly
readonly followChaseViewportSnap: number
gridSteps
readonly
readonly gridSteps: readonly {
readonly mid: number
readonly min: number
readonly step: number
}[]
handleRadius
readonly
readonly handleRadius: number
hitTestMargin
readonly
readonly hitTestMargin: number
laserDelayMs
readonly
readonly laserDelayMs: number
longPressDurationMs
readonly
readonly longPressDurationMs: number
maxExportDelayMs
readonly
readonly maxExportDelayMs: number
maxFilesAtOnce
readonly
readonly maxFilesAtOnce: number
maxPages
readonly
readonly maxPages: number
maxPointsPerDrawShape
readonly
readonly maxPointsPerDrawShape: number
maxShapesPerPage
readonly
readonly maxShapesPerPage: number
multiClickDurationMs
readonly
readonly multiClickDurationMs: number
temporaryAssetPreviewLifetimeMs
readonly
How long should previews created by Editor.createTemporaryAssetPreview last before they expire? Defaults to 3 minutes.
readonly temporaryAssetPreviewLifetimeMs: number
textShadowLod
readonly
readonly textShadowLod: number
Prev
TldrawEditorWithStorePropsNext
TLEditorComponents