@mocanvas/mocanvas · interface

TextShapeProps

interface TextShapeProps

This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.


Properties · 9

autoSize: boolean
color: DefaultColorStyle
font: DefaultFontStyle
richText: RichText

The label as a rich-text document; see NoteShapeProps.richText.

scale: number
size: DefaultSizeStyle
text?: string

The label as plain text — optional and derived; see NoteShapeProps.text.

textAlign: DefaultHorizontalAlignStyle

How the paragraphs are aligned inside the shape's own width.

Typed as the whole horizontal-align set because that is the style the shape declares, and a record written by an older client may hold one of its -legacy values. readTextProps narrows every one of them to start / middle / end, so nothing downstream has to know they exist.

w: number

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.