Content Grouping
Last updated
Last updated
MessageML supports the following tags for grouping information within a message:
Tag
Description
Optional attributes
<h1>
, <h2>
, <h3>
, <h4>
, <h5>
, <h6>
Heading text. 6 levels.
• class
<p>paragraph</p>
Paragraph formatting.
• class
<hr />
Horizontal rule.
None.
<ul>
<li>list item</li>
</ul>
Unordered or bullet list.
Cannot be empty, must contain at least one child <li>
item.
• class
<ol>
<li>list item</li>
</ol>
Numbered list.
Cannot be empty, must contain at least one child <li>
item.
• class
<div>paragraph</div>
<card>
(see example below)
Inserts a card. It contains two different sections:
• the <header>
(always visible)
• the <body>
(hidden)
<expandable-card>
(see example below)
Inserts a card with new styles and multiple levels of display within the card
• state
(mandatory) in <expandable-card>
can take 3 values:
- "collapsed": only header is visible
- "cropped": card expanded but the body is cropped
- "expanded": card fully expanded
• variant
(optional) in <body>
: defines the style of the card. It can be either "default" for the default blue style, or "error" for the red error style
Here after you can find an example of a message sent by a bot and containing these content grouping tags as well as the structure of the messageML sent:
Please note that you can use content grouping tags mixed with other messageML tags such as Interactive Elements Forms. See the following example including forms in expandable-cards.
Block of text.
• This tag can be used to specify visual styles, by adding a class
attribute.
• This tag is used to create .
• This tag is also the root of any message read through the API.
• class
:
• data-entity-id
• data-icon-src
• data-accent-color
• See below for list of translated PresentationML attributes.
• iconSrc
: image will be resized to 28 pixels by 28 pixels, use spacious mode. (.jpg, .png and .gif)
• accent
: use to select the accent color of the card.