Rich text block
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) is its nesting level: a list with a deeper indent than the list before it nests under that list's last item; consecutive rich_text_list elements merge into one continuous outline. border: 1 draws the list inside a quote, which the rich_text_quote elements right after it join, as Slack does.
{ 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"; border?: number; 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>, whose links keep its text colour. border: 1 draws it inside a quote, as Slack does.
{ type: "rich_text_preformatted"; border?: number; elements: (RichTextText | RichTextLink)[] }Inline (RichTextElement) types: text (with style.bold / italic / strike / code /
underline), link, user, usergroup, channel, broadcast, emoji, date, color,
canvas_user_mention, tag, salesforce_data_field, workflow_mention, message_mention,
file, canvas, list_record, work_object_mention, attachment_mention and citation.
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, numbering on from
where it left off. offset (a Builder/undocumented extension to the public schema) sets the
starting number of an ordered list that starts a new outline; a list that continues an earlier
one keeps counting and ignores it, as Slack does.
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
Resting the pointer on a link shows Slack’s link hover card: a “Link” heading with Open in new tab
and Copy link buttons, over the URL as the payload wrote it. Like Slack’s, it opens only on hover,
not on keyboard focus, and Escape closes it. A URL the renderer won’t follow (such as javascript:)
gets no card.
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.
As in Slack, a linked date isn’t underlined until it’s hovered or focused.
Color swatch
A color element (a Builder/undocumented extension) prints a hex value next to a small swatch. A value that isn’t a hex colour prints without a fill:
Tag
A tag element (a Builder/undocumented extension) draws its text as a coloured label, 24px tall,
so its line is 2px taller than plain text. Slack’s blue is the only colour captured so far; every
color draws as blue, from --sbk-tag-bg and --sbk-tag-text.
Salesforce data field
A salesforce_data_field element (a Builder/undocumented extension) points at a field of a
Salesforce record. The renderer can’t read the record, so it draws the field as Slack draws one it
can’t reach: a greyed pill, 24.5px tall, with Salesforce’s cloud and “Record was deleted”. The
record’s ID is on the pill as data-id.
Workflows, messages, files, canvases, lists, work objects and citations
These elements point at something only Slack can look up. The renderer shows each the way Slack
shows it to someone who can’t open it, whatever text the payload gives:
| Element | Shows |
|---|---|
workflow_mention |
A greyed pill with a trash can and “Deleted workflow” |
message_mention |
A greyed pill with a speech bubble and “Private message” |
file |
A greyed pill with a closed eye and “Hidden file” |
canvas |
A blue pill with a lock and “Private canvas” |
list_record |
A blue pill with a lock and “Private list” |
work_object_mention |
A blue pill with the app’s icon and the element’s text, linked to url |
attachment_mention |
The element’s text as a link to url, without an underline |
citation |
A small blue chip, “1 · 🔗 example.com”, linked to url |
A citation shows its index, then details.display_name (or its text) after Slack’s link icon.
A work object shows its app’s icon from resolvers.app, as Slack does (see
Mentions and resolvers). Without it the icon is a square in the
colour of a message’s placeholder avatar.



