Skip to main content

@slack/types / ContainerBlock

Interface: ContainerBlock

Defined in: block-kit/blocks.ts:194

Description​

A general-purpose wrapper for grouping child blocks together, with a configurable size.

See​

Container block reference.

Extends​

Properties​

block_id?​

optional block_id?: string;

Defined in: block-kit/blocks.ts:50

Description​

A string acting as a unique identifier for a block. If not specified, a block_id will be generated. You can use this block_id when you receive an interaction payload to identify the source of the action. Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of a message. If a message is updated, use a new block_id.

Inherited from​

Block.block_id


child_blocks​

child_blocks: (
| RichTextBlock
| ActionsBlock
| ContextBlock
| DividerBlock
| FileBlock
| HeaderBlock
| ImageBlock
| InputBlock
| SectionBlock
| TableBlock
| VideoBlock)[];

Defined in: block-kit/blocks.ts:216

Description​

An array of child blocks. Maximum 10 blocks.


default_collapsed?​

optional default_collapsed?: boolean;

Defined in: block-kit/blocks.ts:244

Description​

Whether the container is collapsed by default. Requires is_collapsible to be true. Defaults to false.


has_header_divider?​

optional has_header_divider?: boolean;

Defined in: block-kit/blocks.ts:249

Description​

Whether to show a visible border separating header from content. Only applies when is_collapsible is not true. Defaults to false.


icon?​

optional icon?: ImageElement;

Defined in: block-kit/blocks.ts:236

Description​

An image element displayed alongside the title and subtitle.


is_collapsible?​

optional is_collapsible?: boolean;

Defined in: block-kit/blocks.ts:240

Description​

Whether the container can be collapsed. Defaults to false.


rich_text_title?​

optional rich_text_title?: RichTextBlock;

Defined in: block-kit/blocks.ts:208

Description​

Rich text title for the container. Takes precedence over title if both are provided. One of title or rich_text_title is required.


subtitle?​

optional subtitle?: TextObject;

Defined in: block-kit/blocks.ts:212

Description​

Subtitle for the container in plain text or mrkdwn format. Maximum length is 150 characters.


title?​

optional title?: PlainTextElement;

Defined in: block-kit/blocks.ts:203

Description​

Plain text title for the container. Maximum length is 150 characters. One of title or rich_text_title is required.


type​

type: "container";

Defined in: block-kit/blocks.ts:198

Description​

The type of block. For a container block, type is always container.

Overrides​

Block.type


width?​

optional width?: "narrow" | "standard" | "wide" | "full";

Defined in: block-kit/blocks.ts:232

Description​

Controls the width of the container. Defaults to "standard".