Rich text
Slack's structured formatted-text block, the same format its own composer produces.
rich_text is Slack’s most expressive text block: paragraphs, lists, quotes, and code, each built
from styled runs and mentions rather than a markdown string. It’s what Slack’s WYSIWYG message
composer outputs, and what a rich_text_input element returns on submit. Reach for it whenever
you need structure mrkdwn can’t express, like nested lists or a fenced code block.
Fields
typestring
Always `rich_text`.
stringelementsRichTextBlockElement[]
The block's top-level content, in order.
RichTextBlockElement[]block_id?string
A unique identifier for this block. Auto-generated if omitted. Maximum length is 255 characters.
stringEach entry in elements is a block-level element: a paragraph, a list, a quote, or a code block.
A block-level element (except a list) in turn holds an array of inline elements: styled text,
links, mentions, emoji, and dates.
rich_text_section?{ type: "rich_text_section"; elements: RichTextElement[] }
A paragraph of inline content, the most common block-level element.
{ type: "rich_text_section"; elements: RichTextElement[] }rich_text_list?{ type: "rich_text_list"; style: "bullet" | "ordered"; indent?: number; border?: number; elements: RichTextSection[] }
A list. `indent` (0–8) nests it under the previous list item at a shallower indent; consecutive rich_text_list elements merge into one continuous outline.
{ type: "rich_text_list"; style: "bullet" | "ordered"; indent?: number; border?: number; elements: RichTextSection[] }rich_text_quote?{ type: "rich_text_quote"; elements: RichTextElement[] }
A blockquote with a colored left bar.
{ type: "rich_text_quote"; elements: RichTextElement[] }rich_text_preformatted?{ type: "rich_text_preformatted"; elements: (RichTextText | RichTextLink)[] }
A monospace code block. A `language` renders it as a syntax-highlighted fenced code block with a copy button; without one it's a plain `<pre>`.
{ type: "rich_text_preformatted"; elements: (RichTextText | RichTextLink)[] }Inline (RichTextElement) types: text (with style.bold / italic / strike / code /
underline), link, user, usergroup, channel, broadcast, emoji, date, and color.
Examples
Section with styled text
Bold, italic, strikethrough, and inline code each come from a text element’s style:
Bullet list
Ordered list
Indented (nested) list
Consecutive rich_text_list elements merge into one outline: a deeper indent nests inside the
previous item, and matching a shallower list’s indent/style continues it. offset (a
Builder/undocumented extension to the public schema) sets the starting number of an ordered list
that continues from an earlier one.
Quote
Preformatted / code block
Without a language, preformatted text renders as a plain monospace block:
A language (a Builder/undocumented extension to the public schema) renders it as a
syntax-highlighted fenced code block instead:
Links
User, channel, and usergroup mentions
Emoji
Text made up only of emoji (and whitespace) renders at a larger “jumbo” size, same as Slack:
Mixed into text, emoji render inline at normal text size:
Dates
A date element formats a UNIX timestamp using curly-brace tokens like {date_short_pretty} and
{time}; fallback is shown if formatting fails, and an optional url makes the whole date a link.
Color swatch
A color element (a Builder/undocumented extension) prints a hex value next to a small swatch:



