TldrawEditorBaseProps
Table of contents
Public interface
Base props for the Tldraw and TldrawEditor components.
interface TldrawEditorBaseProps {}
packages/editor/src/lib/TldrawEditor.tsx
Properties
autoFocus
Public propertysignature
Whether to automatically focus the editor when it mounts.
autoFocus?: boolean
bindingUtils
Public propertysignature
An array of binding utils to use in the editor.
bindingUtils?: readonly TLAnyBindingUtilConstructor[]
cameraOptions
Public propertysignature
Camera options for the editor.
cameraOptions?: Partial<TLCameraOptions>
children
Public propertysignature
The component's children.
children?: ReactNode
className
Public propertysignature
A classname to pass to the editor's container.
className?: string
components
Public propertysignature
Overrides for the editor's components, such as handles, collaborator cursors, etc.
components?: TLEditorComponents
inferDarkMode
Public propertysignature
Whether to infer dark mode from the user's OS. Defaults to false.
inferDarkMode?: boolean
initialState
Public propertysignature
The editor's initial state (usually the id of the first active tool).
initialState?: string
onMount
Public propertysignature
Called when the editor has mounted.
onMount?: TLOnMountHandler
shapeUtils
Public propertysignature
An array of shape utils to use in the editor.
shapeUtils?: readonly TLAnyShapeUtilConstructor[]
tools
Public propertysignature
An array of tools to add to the editor's state chart.
tools?: readonly TLStateNodeConstructor[]
user
Public propertysignature
The user interacting with the editor.
user?: TLUser