Table of contents

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

adjacentShapeMargin

readonly adjacentShapeMargin: number

animationMediumMs

readonly animationMediumMs: number

cameraMovingTimeoutMs

readonly cameraMovingTimeoutMs: number

cameraSlideFriction

readonly cameraSlideFriction: number

coarseDragDistanceSquared

readonly coarseDragDistanceSquared: number

coarseHandleRadius

readonly coarseHandleRadius: number

coarsePointerWidth

readonly coarsePointerWidth: number

collaboratorCheckIntervalMs

readonly collaboratorCheckIntervalMs: number

collaboratorIdleTimeoutMs

readonly collaboratorIdleTimeoutMs: number

collaboratorInactiveTimeoutMs

readonly collaboratorInactiveTimeoutMs: number

defaultSvgPadding

readonly defaultSvgPadding: number

doubleClickDurationMs

readonly doubleClickDurationMs: number

dragDistanceSquared

readonly dragDistanceSquared: number

edgeScrollDelay

readonly edgeScrollDelay: number

edgeScrollDistance

readonly edgeScrollDistance: number

edgeScrollEaseDuration

readonly edgeScrollEaseDuration: number

edgeScrollSpeed

readonly edgeScrollSpeed: number

flattenImageBoundsExpand

readonly flattenImageBoundsExpand: number

flattenImageBoundsPadding

readonly flattenImageBoundsPadding: number

followChaseViewportSnap

readonly followChaseViewportSnap: number

gridSteps

readonly gridSteps: readonly {
  readonly mid: number
  readonly min: number
  readonly step: number
}[]

handleRadius

readonly handleRadius: number

hitTestMargin

readonly hitTestMargin: number

longPressDurationMs

readonly longPressDurationMs: number

maxPages

readonly maxPages: number

maxPointsPerDrawShape

readonly maxPointsPerDrawShape: number

maxShapesPerPage

readonly maxShapesPerPage: number

multiClickDurationMs

readonly multiClickDurationMs: number

textShadowLod

readonly textShadowLod: number

TldrawEditorWithStorePropsTLEditorComponents