Search
TextStyle
TextStyle
A reusable text style defined in the project, including font, size, color, and responsive breakpoints. Text styles let you manage text appearances from one place in a project. In the UI, you can find them in the Assets panel.
Text styles support responsive breakpoints that apply different values at different window widths. A maximum of four breakpoints can be added. Breakpoints are automatically ordered from largest to smallest minWidth. Each breakpoint must have a unique minWidth value.
By default, text styles use a built-in font. Use Font to customize a text style's typeface. All font variants (bold, italic, boldItalic) must share the same font family as the base font.
To organize text styles into folders, use / as a separator in the name, e.g. "My Plugin/Heading".
Methods & Properties
Hierarchical path to the text style in the assets folder structure, e.g. ui/modals/text. Used for organizing text styles in the UI and for programmatic access. Segments are separated by forward slashes.
HTML tag that the style will use.
Base font of the text.
Font to use for bold text.
Font to use for italic text.
Font to use for bold italic text.
Color of the text in RGBA format for all breakpoints, e.g rgba(242, 59, 57, 1)
Specifies how to capitalize the text for all breakpoints.
Specifies the horizontal direction of the text for all breakpoints.
Appearance of any decorative lines on the text for all breakpoints.
Color of the text decoration in RGBA format for all breakpoints, e.g rgba(242, 59, 57, 1)
Thickness of the text decoration for all breakpoints.
Style of the text decoration for all breakpoints.
Whether to skip ink when drawing the text decoration for all breakpoints.
Offset of the text decoration for all breakpoints.
When enabled, use a text wrap method that tries to balance the number of characters on each line for legibility.
A list of style overrides that take affect at specific window widths. Breakpoints are automatically sorted by minWidth from largest to smallest.
How big does the window width need to be for primary breakpoint styles to take affect.
Size of the text of the primary breakpoint.
Size of the space between each letter for the primary breakpoint.
Size of the space between each line of text for the primary breakpoint.
Size of the space between each paragraph for the primary breakpoint.
Set the attributes of the text style. All attributes except breakpoints are merged with existing values. When setting breakpoints, the provided array replaces any existing breakpoints entirely. To update breakpoints without overriding them all, iterate over the existing breakpoints and merge them.
Get plugin data for this text style by key.
Set plugin data on this text style by key.
Get all plugin data keys for this text style.
Deletes the text style from the project. You need a reference to the style to call this method.