TLComponents

See source code
Table of contents

Extends TLEditorComponents, TLUiComponents.

Override the default react components used by the editor and UI. Set components to null to disable them entirely.

interface TLComponents extends TLEditorComponents, TLUiComponents {}

Example

import { Tldraw, TLComponents } from "tldraw";

const components: TLComponents = {
  Scribble: MyCustomScribble,
};

export function MyApp() {
  return <Tldraw components={components} />;
}

Properties

A11y

optional
A11y?: ComponentType | null;

ActionsMenu

optional
ActionsMenu?: ComponentType<TLUiActionsMenuProps> | null;

Background

optional
Background?: ComponentType | null;

Canvas

optional
Canvas?: ComponentType<TLCanvasComponentProps> | null;

ContextMenu

optional
ContextMenu?: ComponentType<TLUiContextMenuProps> | null;

CursorChatBubble

optional
CursorChatBubble?: ComponentType | null;

DebugMenu

optional
DebugMenu?: ComponentType | null;

DebugPanel

optional
DebugPanel?: ComponentType | null;

Dialogs

optional
Dialogs?: ComponentType | null;

ErrorFallback

optional
ErrorFallback?: TLErrorFallbackComponent;

FollowingIndicator

optional
FollowingIndicator?: ComponentType | null;

Grid

optional
Grid?: ComponentType<TLGridProps> | null;

HelperButtons

optional
HelperButtons?: ComponentType<TLUiHelperButtonsProps> | null;

HelpMenu

optional
HelpMenu?: ComponentType<TLUiHelpMenuProps> | null;

ImageToolbar

optional
ImageToolbar?: ComponentType | null;

InFrontOfTheCanvas

optional
InFrontOfTheCanvas?: ComponentType | null;

KeyboardShortcutsDialog

optional
KeyboardShortcutsDialog?: ComponentType<TLUiKeyboardShortcutsDialogProps> | null;

LoadingScreen

optional
LoadingScreen?: ComponentType | null;

optional
MainMenu?: ComponentType<TLUiMainMenuProps> | null;

optional
MenuPanel?: ComponentType | null;

Minimap

optional
Minimap?: ComponentType | null;

optional
NavigationPanel?: ComponentType | null;

OnTheCanvas

optional
OnTheCanvas?: ComponentType | null;

optional
PageMenu?: ComponentType | null;

PeopleMenu

optional
PeopleMenu?: ComponentType | null;

PeopleMenuAvatar

optional
PeopleMenuAvatar?: ComponentType<TLUiPeopleMenuAvatarProps> | null;

PeopleMenuFacePile

optional
PeopleMenuFacePile?: ComponentType<TLUiPeopleMenuFacePileProps> | null;

PeopleMenuItem

optional
PeopleMenuItem?: ComponentType<TLUiPeopleMenuItemProps> | null;

QuickActions

optional
QuickActions?: ComponentType<TLUiQuickActionsProps> | null;

RichTextToolbar

optional
RichTextToolbar?: ComponentType<TLUiRichTextToolbarProps> | null;

SelectionBackground

optional
SelectionBackground?: ComponentType<TLSelectionBackgroundProps> | null;

ShapeErrorFallback

optional
ShapeErrorFallback?: TLShapeErrorFallbackComponent;

ShapeWrapper

optional
ShapeWrapper?: ComponentType<
  TLShapeWrapperProps & RefAttributes<HTMLDivElement>
> | null;

SharePanel

optional
SharePanel?: ComponentType | null;

Spinner

optional
Spinner?: ComponentType<React.SVGProps<SVGSVGElement>> | null;

StylePanel

optional
StylePanel?: ComponentType<TLUiStylePanelProps> | null;

SvgDefs

optional
SvgDefs?: ComponentType | null;

Toasts

optional
Toasts?: ComponentType | null;

Toolbar

optional
Toolbar?: ComponentType | null;

TopPanel

optional
TopPanel?: ComponentType | null;

UserPresenceEditor

optional
UserPresenceEditor?: ComponentType | null;

VideoToolbar

optional
VideoToolbar?: ComponentType | null;

ZoomMenu

optional
ZoomMenu?: ComponentType<TLUiZoomMenuProps> | null;

Prev
TLCollaboratorShapeIndicatorOverlay
Next
TLDefaultExternalContentHandlerOpts