Table of contents

Extends TldrawUiProps, TldrawEditorBaseProps, TLExternalContentProps.

interface TldrawBaseProps
  extends TldrawUiProps,
    TldrawEditorBaseProps,
    TLExternalContentProps {}

Properties

acceptedImageMimeTypes

from TLExternalContentProps

The mime types of images that are allowed to be handled. Defaults to DEFAULT_SUPPORTED_IMAGE_TYPES.

acceptedImageMimeTypes?: readonly string[]

acceptedVideoMimeTypes

from TLExternalContentProps

The mime types of videos that are allowed to be handled. Defaults to DEFAULT_SUPPORT_VIDEO_TYPES.

acceptedVideoMimeTypes?: readonly string[]

assetUrls

from TldrawUiProps

Asset URL override.

assetUrls?: TLUiAssetUrlOverrides

autoFocus

from TldrawEditorBaseProps

Whether to automatically focus the editor when it mounts.

autoFocus?: boolean

bindingUtils

from TldrawEditorBaseProps

An array of binding utils to use in the editor.

bindingUtils?: readonly TLAnyBindingUtilConstructor[]

cameraOptions

from TldrawEditorBaseProps

Camera options for the editor.

cameraOptions?: Partial<TLCameraOptions>

children

from TldrawUiProps

The component's children.

children?: ReactNode

className

from TldrawEditorBaseProps

A classname to pass to the editor's container.

className?: string

components

components?: TLComponents

forceMobile

from TldrawUiContextProviderProps

Whether to always should the mobile breakpoints.

forceMobile?: boolean

hideUi

from TldrawUiProps

Whether to hide the user interface and only display the canvas.

hideUi?: boolean

inferDarkMode

from TldrawEditorBaseProps

Whether to infer dark mode from the user's OS. Defaults to false.

inferDarkMode?: boolean

initialState

from TldrawEditorBaseProps

The editor's initial state (usually the id of the first active tool).

initialState?: string

licenseKey

from TldrawEditorBaseProps

The license key.

licenseKey?: string

maxAssetSize

from TLExternalContentProps

The maximum size (in bytes) of an asset. Assets larger than this will be rejected. Defaults to 10mb (10 * 1024 * 1024).

maxAssetSize?: number

maxImageDimension

from TLExternalContentProps

The maximum dimension (width or height) of an image. Images larger than this will be rescaled to fit. Defaults to infinity.

maxImageDimension?: number

onMount

from TldrawEditorBaseProps

Called when the editor has mounted.

onMount?: TLOnMountHandler

onUiEvent

from TldrawUiContextProviderProps

Callback for when an event occurs in the UI.

onUiEvent?: TLUiEventHandler

options

from TldrawEditorBaseProps

Options for the editor.

options?: Partial<TldrawOptions>

overrides

from TldrawUiContextProviderProps

Overrides for the UI.

overrides?: TLUiOverrides | TLUiOverrides[]

renderDebugMenuItems

from TldrawUiProps

Additional items to add to the debug menu (will be deprecated)

renderDebugMenuItems?: () => React.ReactNode

shapeUtils

from TldrawEditorBaseProps

An array of shape utils to use in the editor.

shapeUtils?: readonly TLAnyShapeUtilConstructor[]

tools

from TldrawEditorBaseProps

An array of tools to add to the editor's state chart.

tools?: readonly TLStateNodeConstructor[]

user

from TldrawEditorBaseProps

The user interacting with the editor.

user?: TLUser

TLComponentsTldrawFile