CMS
Banners
TextBlock

TextBlock

The TextBlock is a simple flexible text element that allows for various stylings applied to its text, which can then either be used as standalone banner or be embedded into another banner, that supports wrapping other banners.

Create

POST _apiBaseUrl/v1/cms/banner/text-block

Code

TextBlockDto
{
   "text":{
      "content":"I'm a title.",
      "size":"lg",
      "weight":"semibold",
      "classification":"sans"
   },
   "styleOptions":{
      "alignment":"center",
      "isHeader":true
   }
}

Arguments

text●required

The text element which is the main actor of the text block.

styleOptions●

Optional style options to customize the text block.

TextBlockStyleOptionsDto
alignment●

Defines the alignment of the text in its container.

isHeader●
boolean|
null

If isHeader is set to true, the frontend will render the text inside the text block not as default <p> element, but will utilize a header tag instead (<h2>).