Skip to content

Documentation / @ripl/core / TextOptions

Type Alias: TextOptions ​

TextOptions = object

Defined in: packages/core/src/context/types.ts:199

Options for creating a text element within the context.

Properties ​

content ​

content: string

Defined in: packages/core/src/context/types.ts:207

The text string to render.


id? ​

optional id?: string

Defined in: packages/core/src/context/types.ts:201

Optional stable id; a unique id is generated when omitted.


maxWidth? ​

optional maxWidth?: number

Defined in: packages/core/src/context/types.ts:209

Maximum width, in pixels, the text is scaled to fit within.


pathData? ​

optional pathData?: string

Defined in: packages/core/src/context/types.ts:211

SVG path data along which the text is laid out, for text-on-a-path.


startOffset? ​

optional startOffset?: number

Defined in: packages/core/src/context/types.ts:213

Offset along the text path at which rendering begins.


x ​

x: number

Defined in: packages/core/src/context/types.ts:203

X coordinate of the text's anchor position.


y ​

y: number

Defined in: packages/core/src/context/types.ts:205

Y coordinate of the text's anchor position.