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

Block Kit limits

Every limit Slack puts on Block Kit payloads, from blocks per message to text lengths, options per select and table sizes, with the Slack page each comes from.

Slack’s API rejects a payload that breaks one of these limits: chat.postMessage answers with an error such as invalid_blocks or msg_blocks_too_long, and views.open with invalid_arguments. Every number on this page comes from Slack’s own reference at docs.slack.dev, and each limit links to the page it comes from. Limits Slack doesn’t document are left out.

What this package checks

@nkootstra/block-kit is a renderer, not a validator: it draws whatever payload you give it, even one Slack would reject. A message with 60 blocks renders all 60. Check limits on your server before you send a payload to Slack, or as your users type in an editor.

A few limits do change how the preview behaves, the same way they do in Slack’s client:

Limit What the renderer does
3 views in a modal stack views.push past the third view does nothing and logs a console warning. See Modals.
min_length / max_length on a text input Shows the characters left while typing, and blocks Submit with Slack’s message. See Validation.
min_value / max_value on a number input Blocks Submit with Slack’s message.
max_selected_items on a multi-select Stops adding items at the limit and shows “You can select up to N items.”
max_files on a file input Keeps the first max_files files picked (10 when unset).
page_size on a data table Not read: the table always shows 5 rows per page, Slack’s default.

Surfaces

What Limit
Blocks in a message 50
Blocks in a modal 100
Blocks in a Home tab 100
Modal title, submit and close text 24 characters each
private_metadata on a view 3,000 characters
callback_id on a view 255 characters
external_id on a view 255 characters, unique across the team
Views in a modal stack 3 (the first, plus 2 pushed)
Message text Truncated past 40,000 characters; Slack advises under 4,000
markdown_text on chat.postMessage 12,000 characters
Attachments in a message 100
Contact cards in a message 10

Blocks

Every block’s block_id is limited to 255 characters, and should be unique for each message or view and each update of it (section block, and the same on each block’s page).

Block What Limit
actions elements 25
alert text 200 characters
card title, subtitle 150 characters each
card body, subtext 200 characters each
card Buttons in actions 3
card hero_image and icon URL; their alt_text 3,000 characters; 2,000 characters
carousel Cards 1 to 10
container title, subtitle 150 characters each
container child_blocks 10
container icon URL; its alt_text 3,000 characters; 2,000 characters
context elements 10
context_actions elements 5
data_table rows, header included 2 to 201
data_table Columns 1 to 20
data_table Characters across all cells, per table and per message 20,000
data_table page_size 1 to 100, default 5
data_visualization Blocks in a message 2
data_visualization title, x_label, y_label 50 characters each
data_visualization Series in a bar, line or area chart; segments in a pie 1 to 12
data_visualization Data points in a series 1 to 20
data_visualization Series name, segment label, data point label, each category 20 characters each
header text 150 characters
image image_url 3,000 characters
image alt_text; title text 2,000 characters each
image File types png, jpg, jpeg, gif
input label, hint 2,000 characters each
markdown text, across all markdown blocks in a payload 12,000 characters
plan Tasks 50
section text 1 to 3,000 characters
section fields; each field’s text 10; 2,000 characters
table rows 100
table Cells in a row; column_settings 20 each
table Characters across all cells, per table and per message 10,000
video title and description text Under 200 characters each
video author_name Under 50 characters

Slack’s image block page lists the supported file types but no maximum file size or pixel dimensions, so none are given here.

Elements

Every interactive element’s action_id is limited to 255 characters, and should be unique among the action_ids in its block (button element, and the same on each element’s page).

Element What Limit
button text 75 characters; may truncate around 30
button value 2,000 characters
button url 3,000 characters
button accessibility_label 75 characters
checkboxes options 10
radio_buttons options 10
overflow options 5
Select menus options 100
Select menus option_groups; options in each group 100; 100
Multi-select menus options; option_groups 100; 100
Multi-select menus max_selected_items At least 1
plain_text_input min_length 0 to 3,000
plain_text_input max_length 1 to 3,000
rich_text_input min_lines, max_lines 1 to 100 each; max_lines defaults to 8
file_input max_files 1 to 10, default 10
file_input File size 100 MB
image image_url 3,000 characters
workflow_button text; accessibility_label 75 characters each
feedback_buttons Each button’s text; accessibility_label 75 characters each
feedback_buttons Each button’s value 2,000 characters
icon_button value; accessibility_label 2,000 characters; 75 characters

Placeholders

The placeholder text on a select menu, multi-select menu, date picker, time picker, plain_text_input, email_text_input, url_text_input, number_input and rich_text_input is limited to 150 characters each (see each element’s page, for example the select menu element).

Composition objects

Object What Limit
Text object text 1 to 3,000 characters
Option text, description 75 characters each
Option value 150 characters
Option url (overflow menus only) 3,000 characters
Option group label 75 characters
Option group options 100
Confirmation dialog title 100 characters
Confirmation dialog text 300 characters
Confirmation dialog confirm, deny 30 characters each

Last updated on