TLEmbedShape

See source code

An embed shape displays external content like YouTube videos, Figma designs, CodePen demos, and other embeddable content within the tldraw canvas.

type TLEmbedShape = TLBaseShape<'embed', TLEmbedShapeProps>

Example

const embedShape: TLEmbedShape = {
  id: createShapeId(),
  typeName: 'shape',
  type: 'embed',
  x: 200,
  y: 200,
  rotation: 0,
  index: 'a1',
  parentId: 'page:page1',
  isLocked: false,
  opacity: 1,
  props: {
    w: 560,
    h: 315,
    url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
  },
  meta: {},
}
Prev
TLDrawShape
Next
TLFrameShape