TLDefaultShape
The default set of shapes that are available in the editor.
This union type represents all the built-in shape types supported by tldraw, including arrows, bookmarks, drawings, embeds, frames, geometry shapes, groups, images, lines, notes, text, videos, and highlights.
type TLDefaultShape =
| TLArrowShape
| TLBookmarkShape
| TLDrawShape
| TLEmbedShape
| TLFrameShape
| TLGeoShape
| TLGroupShape
| TLHighlightShape
| TLImageShape
| TLLineShape
| TLNoteShape
| TLTextShape
| TLVideoShape;Example
// Check if a shape is a default shape type
function isDefaultShape(shape: TLShape): shape is TLDefaultShape {
const defaultTypes = [
"arrow",
"bookmark",
"draw",
"embed",
"frame",
"geo",
"group",
"image",
"line",
"note",
"text",
"video",
"highlight",
];
return defaultTypes.includes(shape.type);
}Prev
TLDefaultRecordNext
TLDefaultSizeStyle