Skip to content
Block Kit for React
Esc
↑↓navigate↵open⌘Jpreview
On this page

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.

Your AppAPP
Ship it, ! Don't forget to update #releases and loop in @engineering.

Fields

PropType
typestring

Always `rich_text`.

Typestring
elementsRichTextBlockElement[]

The block's top-level content, in order.

TypeRichTextBlockElement[]
block_id?string

A unique identifier for this block. Auto-generated if omitted. Maximum length is 255 characters.

Typestring

Each 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.

PropType
rich_text_section?{ type: "rich_text_section"; elements: RichTextElement[] }

A paragraph of inline content, the most common block-level element.

Type{ 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{ 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{ 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{ 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:

Your AppAPP
Hello there, I am bold, italic, struck through, and code.

Bullet list

Your AppAPP
  • First item
  • Second item
  • Third item

Ordered list

Your AppAPP
  1. First
  2. Second
  3. Third

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.

Your AppAPP
  1. First
  2. Second
    • Nested bullet
  3. Third (offset)

Quote

Your AppAPP
I am a basic rich text quote.

Preformatted / code block

Without a language, preformatted text renders as a plain monospace block:

Your AppAPP
npm install @nkootstra/block-kit

A language (a Builder/undocumented extension to the public schema) renders it as a syntax-highlighted fenced code block instead:

Your AppAPP
TypeScript
function Hello({ name }: { name: string }) {  return <p>Hello, {name}!</p>;}
Your AppAPP
Check out Slack or a styled link.

User, channel, and usergroup mentions

Your AppAPP
Hey and , see #design and loop in @engineering. @here

Emoji

Text made up only of emoji (and whitespace) renders at a larger “jumbo” size, same as Slack:

Your AppAPP
:rocket::tada::checkered_flag:

Mixed into text, emoji render inline at normal text size:

Your AppAPP
Nice work :wave:

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.

Your AppAPP
Due Jan 1, 2026 at 10:00 AM

Color swatch

A color element (a Builder/undocumented extension) prints a hex value next to a small swatch:

Your AppAPP
Brand color: #1264A3

Was this page helpful?