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

Markdown block

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. Slack allows 12,000 characters across all markdown blocks in a payload, not per block. A block whose text is longer than 12,000 characters shows it as plain text, unparsed.

Typestring
block_id?string

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

Typestring

A paragraph keeps its first 500 emphasis markers (*, _, ~) and brackets as markdown, far more than a paragraph uses; from the next one on, the rest of the paragraph shows as written. Text built to slow a markdown parser down still parses in a fraction of a second this way.

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

Lists and quotes

Bulleted and numbered lists render like rich_text lists, with Slack’s bullet glyphs and the numbers lined up under the bullets. A list, quote or code block gets the same paragraph gap as a paragraph before whatever follows it:

Your AppAPP
  • A bullet
  • Another bullet
    • A nested bullet
  1. A numbered item
  2. Another one
A quote
A closing paragraph.

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

Last updated on