Text
Text component - Abyssale REST API
Available properties:
Property | Description |
---|---|
payload | |
color | |
background_color | Same as |
background_padding | |
font_size | Number. Force font size in pixels (must be > 1) |
font font_weight | |
line_height | Number. Force line height in percentage (must be > 1). This parameter is only applied when the text is a multiline one. |
skew_y | Number: between |
alignment | |
stroke_width stroke_color | |
shadow_color shadow_blur shadow_offset_x shadow_offset_y |
Example of a decorated text:
| |
|
Color
color
: The text color, can be a monochrome (6-8 digits hexa color) , gradient (Go to Linear Gradient documentation), or cmyka (only for print, cmyka)
Examples:
| |
| |
|
Payload
payload
is the text content.
Constraints:
Cannot be empty
2048 characters maximum
Line breaks
By default, line breaks are automatically computed from the available space.
You can however force line breaks by adding \n
.
Beware of external integrations (Zapier, Integromat, Airtable): as they support multi text line inputs this parameter won't be interpreted on the Abyssale generation side.
Example:
|
Partial Text Decorations
Text markups can be added to underline, colorise, strike of change font weight on specific part of the payload. (it resembles html markup but is not)
Text markups will override global text decoration settings. If you only want to change the global text style, do not use markups -> use global text properties.
Available markups:
Type | Markup |
---|---|
Color |
|
Font weight |
|
Underline |
Example: |
Underline with colored line |
Example: |
Strike through |
Example: |
Strike through with colored strike |
Example: |
Diagonal Strike through |
Example: |
Diagonal Strike through with colored strike |
Example: |
Background color |
|
Font size |
|
Superscript |
|
Subscript |
|
{hexaColor}
: 6 or 8 (for the opacity) digits hexadecimal color starting with # (i.e. #EAEAEA
or #00000080
)
{cmykaColor}
: 4-5 numbers digits starting with cmyka
(only for print)
All of those markups can be combined.
It works like HTML. You have to pay attention on how you write your opening & closing tags.
Background padding
background_padding
: The padding of the background color around the text.
String: Two numbers separated by a space: First number represents the vertical padding in pixels & the second the vertical padding. For instance:
0 10
:0
as vertical padding &10
as horizontalor 1
Number
: Horizontal & vertical paddings in pixels
This parameter will only be used if a background color is defined.
Examples:
| |
|
Stroke
A stroke can be added to text. In order to customise it, 2 properties are available:
stroke_width
: Number between 0 & 40. Width of the strokestroke_color
: 6-8 digits Hexa color. , for print cmyka
If your template does not contain any stroke, those 2 properties are required to have a stroke (and the width must be > 0).
Example:
|
Text Alignment
alignment
can be defined to override the default text alignment.
The text position will then be computed from the text bounding box defined within the template.
It can be of two forms:
One string:
top
,middle
,bottom
,left
,center
,right
Two strings: One vertical alignment parameter (
top
,middle
,bottom
) associated with a horizontal alignment parameter (left
,center
,right
) separated by a space. i.e: (top left
,middle right
)
Examples:
| |
|
Font
The default font can be overridden with the font
and font_weight
properties:
font
: String. Force a specific font by ID. The fonts list is available by calling theGET /fonts
API route.font_weight
: Number. Force a font weight. Available values: 100, 200, 300, 400, 500, 600, 700, 800, 900
If the font does not contain a font weight, the nearest weight will be used.
Examples:
Podkova font (Medium):
| |
Poppins font (Extra Bold):
|
Last updated