TLTextShapeProps

See source code
Table of contents

Configuration interface defining properties for text shapes in tldraw. Text shapes support rich formatting, styling, and automatic sizing.

interface TLTextShapeProps {}

Example

const textProps: TLTextShapeProps = {
  color: "black",
  size: "m",
  font: "draw",
  textAlign: "start",
  w: 200,
  richText: toRichText("Hello **bold** text"),
  scale: 1,
  autoSize: true,
};

Properties

autoSize

autoSize: boolean;

color


font


richText

richText: TLRichText;

scale

scale: number;

size


textAlign

textAlign: TLDefaultTextAlignStyle;

w

w: number;

Prev
TLStoreProps
Next
TLUser