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

Container

Groups blocks together with a shared border, an optional header, and a width limit.

container wraps a list of child blocks with a border and background, an optional header with an icon, title, and subtitle, and a width variant. It can also be made collapsible. It’s a library-invented block, not part of the public @slack/types package.

Your AppAPP
Project icon
Project UpdatesLast synced 5 minutes ago
Section title
This is a section block with markdown text inside the container.

Last updated: May 14, 2026 at 3:42 PM

Fields

PropType
typestring

Always `container`.

Typestring
title?PlainTextElement | MrkdwnElement

Bold text in the header.

TypePlainTextElement | MrkdwnElement
subtitle?PlainTextElement | MrkdwnElement

Muted text under the title.

TypePlainTextElement | MrkdwnElement
icon?{ type: "image"; image_url: string; alt_text?: string }

A 36×36 rounded icon, left of the title and subtitle.

Type{ type: "image"; image_url: string; alt_text?: string }
width?"narrow" | "standard" | "wide" | "full"

The container's max width. An unrecognized or omitted value falls back to `standard`.

Type"narrow" | "standard" | "wide" | "full"
Default"standard"
is_collapsible?boolean

Makes the header a toggle button with a chevron. When true, the header always renders even with no title, subtitle, or icon.

Typeboolean
Defaultfalse
default_collapsed?boolean

Starts the container collapsed. Only takes effect when `is_collapsible` is `true`.

Typeboolean
Defaultfalse
has_header_divider?boolean

Adds a border between the header and the body.

Typeboolean
Defaultfalse
child_blocks?Block[]

Blocks rendered inside the container.

TypeBlock[]

Examples

Widths

Your AppAPP
Standard Width Container
This is a simple rich text block inside a container.
Your AppAPP
Narrow Width Container
This is a simple rich text block inside a container.
Your AppAPP
Wide Width Container
This is a simple rich text block inside a container.
Your AppAPP
Full Width Container
This is a simple rich text block inside a container.

Collapsible

Your AppAPP
This is a simple rich text block inside a container.
Section title
This is a section block with markdown text inside the container.

Set default_collapsed: true to start it collapsed instead.

Header divider

Your AppAPP
Header Divider ContainerA visible border separates the header from the content
Section title
This is a section block with markdown text inside the container.
Last updated: May 14, 2026 at 3:42 PM

Icon and subtitle

The preview at the top of this page shows a container with an icon, title, and subtitle together.

Interactive children

Your AppAPP
Add a teammate
Name
onActionInteract with the preview.

A container doesn’t intercept its children’s interactions. An input or actions block inside it dispatches the same block_actions payload it would at the top level.

Interactivity

Interactive child_blocks (buttons, selects, inputs) dispatch Slack’s standard block_actions payload, keyed by whatever block_id and action_id that child block declares. See Interactivity for the full payload shape.

Was this page helpful?