defaultShapeSchemas

See source code

Default shape schema configurations for all built-in tldraw shape types. Each shape type includes its validation props and migration sequences.

This object contains schema information for: - arrow: Directional lines that can bind to other shapes - bookmark: Website bookmark cards with preview information - draw: Freehand drawing paths created with drawing tools - embed: Embedded content from external services (YouTube, Figma, etc.) - frame: Container shapes for organizing content - geo: Geometric shapes (rectangles, ellipses, triangles, etc.) - group: Logical groupings of multiple shapes - highlight: Highlighting strokes from the highlighter tool - image: Raster image shapes referencing image assets - line: Multi-point lines and splines - note: Sticky note shapes with text content - text: Rich text shapes with formatting support - video: Video shapes referencing video assets

defaultShapeSchemas: {
  arrow: {
    migrations: MigrationSequence
    props: RecordProps<import('.').TLArrowShape>
  }
  bookmark: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLBookmarkShape>
  }
  draw: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLDrawShape>
  }
  embed: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLEmbedShape>
  }
  frame: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLFrameShape>
  }
  geo: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLGeoShape>
  }
  group: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLGroupShape>
  }
  highlight: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLHighlightShape>
  }
  image: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLImageShape>
  }
  line: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLLineShape>
  }
  note: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLNoteShape>
  }
  text: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLTextShape>
  }
  video: {
    migrations: TLPropsMigrations
    props: RecordProps<import('.').TLVideoShape>
  }
}

Example

import { createTLSchema, defaultShapeSchemas } from '@tldraw/tlschema'

// Use all default shapes
const schema = createTLSchema({
  shapes: defaultShapeSchemas,
})

// Use only specific default shapes
const minimalSchema = createTLSchema({
  shapes: {
    geo: defaultShapeSchemas.geo,
    text: defaultShapeSchemas.text,
  },
})
Prev
DefaultLabelColorStyle
Next
DefaultSizeStyle