Skip to main content

Rich text list element

Fields

FieldTypeDescriptionRequired?
typeStringThe type of sub-element; in this case, rich_text_list.Required
styleStringEither bullet or ordered, the latter meaning a numbered list.Required
elementsObject []An array of rich_text_section objects containing two properties: type, which is "rich_text_section", and elements, which is an array of rich text elements. Rich text elements include attachment_mention, broadcast, canvas, canvas_user_mention, canvas_message_unfurl, channel, citation, color, date, emoji, file, link, list_record, message_mention, salesforce_data_field, tag, team, text, user, usergroup, work_object_mention, workflow_mention.Required
indentNumberSub-list indent level.Optional
offsetNumberNumber to offset the first number in the list. For example, if the offset = 4, the first number in the ordered list would be 5.Optional
borderNumberTurn the border on or off.Optional

Example

An example of a rich_text_list block

{
"blocks": [
{
"type": "rich_text",
"block_id": "block1",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "My favorite Slack features (in no particular order):"
}
]
},
{
"type": "rich_text_list",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Huddles"
}
]
},
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Canvas"
}
]
},
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Developing with Block Kit"
}
]
}
],
"style": "bullet",
"indent": 0,
"border": 1
}
]
}
]
}

View in Block Kit Builder

Let's say we want to create a nested list, for example something that looks like this:

Breakfast foods I enjoy:

  • Hashbrowns
  • Eggs
    • Scrambled
    • Over easy
  • Pancakes, extra syrup

To create that in rich text, create three instances of rich_text_list, the middle one using the indent property to indent the types of eggs into that sub-list.

{
"blocks": [
{
"type": "rich_text",
"block_id": "block1",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Breakfast foods I enjoy:"
}
]
},
{
"type": "rich_text_list",
"style": "bullet",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Hashbrowns"
}
]
},
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Eggs"
}
]
}
]
},
{
"type": "rich_text_list",
"style": "bullet",
"indent": 1,
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Scrambled"
}
]
},
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Over easy"
}
]
}
]
},
{
"type": "rich_text_list",
"style": "bullet",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Pancakes, extra syrup"
}
]
}
]
}
]
}
]
}

View in Block Kit Builder