Skip to main content

@slack/types / ContainerBlock

Interface: ContainerBlock

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

Description​

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

See​

Container block reference.

Extends​

Properties​

block_id?​

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:282

Description​

An array of child blocks. Maximum 10 blocks.


default_collapsed?​

default_collapsed?: boolean;

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

Description​

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


has_header_divider?​

has_header_divider?: boolean;

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

Description​

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


icon?​

icon?: ImageElement;

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

Description​

An image element displayed alongside the title and subtitle.


is_collapsible?​

is_collapsible?: boolean;

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

Description​

Whether the container can be collapsed. Defaults to false.


rich_text_title?​

rich_text_title?: RichTextBlock;

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

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?​

subtitle?: TextObject;

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

Description​

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


title?​

title?: PlainTextElement;

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

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:264

Description​

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

Overrides​

Block.type


width?​

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

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

Description​

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