Rich text list element
Fields
| Field | Type | Description | Required? |
|---|---|---|---|
type | String | The type of sub-element; in this case, rich_text_list. | Required |
style | String | Either bullet or ordered, the latter meaning a numbered list. | Required |
elements | Object [] | 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 |
indent | Number | Sub-list indent level. | Optional |
offset | Number | Number 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 |
border | Number | Turn the border on or off. | Optional |
Example

- JSON
- Python Slack SDK
- Node Slack SDK
- Java Slack SDK
{
"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
}
]
}
]
}
block-kit/src/blocks/rich_text.py
loading...
block-kit/src/blocks/rich_text.js
loading...
block-kit/src/main/java/blocks/RichText.java
loading...
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.
- JSON
- Python Slack SDK
- Node Slack SDK
- Java Slack SDK
{
"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"
}
]
}
]
}
]
}
]
}
block-kit/src/blocks/rich_text.py
loading...
block-kit/src/blocks/rich_text.js
loading...
block-kit/src/main/java/blocks/RichText.java
loading...