Optional
alignAlignment for multiline text, does not affect single line text
Optional
breakWhether to allow line breaks within words. Requires wordWrap to be true.
Optional
Advanced
cssList of CSS style overrides to apply to the HTML text. These styles are added after the built-in styles and can override any default styling.
Optional
dropDrop shadow configuration for the text. Can be boolean or a TextDropShadow object.
Optional
fillFill style for the text. Can be a color, gradient, or pattern.
Optional
fontFont family or families to use. Can be single name or array of fallbacks.
Optional
fontFont size in pixels or as string.
Equivalents are '26px','20pt','160%' or '1.6em')
Optional
fontFont style (normal, italic, oblique).
Optional
fontFont variant (normal, small-caps).
Optional
fontFont weight (normal, bold, bolder, lighter, 100-900).
Optional
letterThe amount of spacing between letters, default is 0
Optional
lineThe line height, a number that represents the vertical space that a letter uses
Optional
paddingPadding around the text.
Occasionally some fonts are cropped. Adding some padding will prevent this from happening by adding padding to all sides of the text.
Optional
strokeStroke style for text outline.
Optional
tagCustom styles to apply to specific HTML tags. Allows for consistent styling of custom elements without CSS overrides.
Optional
whiteHow to handle whitespace.
It needs wordWrap to be set to true for this to have an effect.
Optional
wordIndicates if word wrap should be used
Optional
wordThe width at which text will wrap, it needs wordWrap to be set to true
Options for HTML text style, extends standard text styling with HTML-specific capabilities. Omits certain base text properties that don't apply to HTML rendering.
Example