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? ​
optionalid?:string
Defined in: packages/core/src/context/types.ts:201
Optional stable id; a unique id is generated when omitted.
maxWidth? ​
optionalmaxWidth?:number
Defined in: packages/core/src/context/types.ts:209
Maximum width, in pixels, the text is scaled to fit within.
pathData? ​
optionalpathData?: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? ​
optionalstartOffset?: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.