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

Markdown

A block of standard GitHub-flavored markdown, for text you didn't hand-assemble into rich text.

markdown takes one raw markdown string and lets Slack do the parsing, instead of you building a rich_text tree or a mrkdwn string by hand. Slack expands it into the same headings, lists, dividers, code blocks, and tables you’d get from other blocks. It’s meant for text an LLM produced, where you don’t control the exact markdown shape ahead of time.

Your AppAPP
Text can be bold, italic, strikethrough, or inline code.Combine them: bold italic and links.
Blockquotes work too, with formatting inside.

Fields

PropType
typestring

Always `markdown`.

Typestring
textstring

Standard markdown-formatted text. Limit 12,000 characters.

Typestring
block_id?string

A unique identifier for the block, up to 255 characters. Slack generates one if omitted.

Typestring

Examples

Inline styles

Your AppAPP
Text can be bold, italic, strikethrough, or inline code.Combine them: bold italic and links.
Blockquotes work too, with formatting inside.

Headings and dividers

Headings past ### still render at the same size as ###. A line of --- renders as a divider.

Your AppAPP

Heading 1

Introduction paragraph.

Heading 2

More details here.

Heading 3

Even more details.

Heading 4

Heading 5

Heading 6

Fenced code blocks

A fenced code block with a language tag renders with a language label and copy button, the same chrome used by rich_text’s preformatted sections:

{ "blocks": [ { "type": "markdown", "text": "Here is a JavaScript function:\n\n```javascript\nfunction greet(name) {\n return \"Hello, \" + name + \"!\";\n}\n\nconsole.log(greet(\"world\"));\n```" } ] }

Tables

Standard GFM table syntax renders as a table, right inside the markdown text:

Your AppAPP

Sprint Status

TaskOwnerStatus
AuthenticationAda LovelaceDone Shipped
DashboardGrace HopperIn Progress
API DocsAlan TuringNot Started

Was this page helpful?