Skip to main content

Interface: ContextBlock

Description

Displays contextual info, which can include both images and text.

See

Context block reference.

Extends

Properties

block_id?

optional block_id: string;

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

Defined in

block-kit/blocks.ts:39


elements

elements: ContextBlockElement[];

Description

An array of ImageElement, PlainTextElement or MrkdwnElement objects. Maximum number of items is 10.

Defined in

block-kit/blocks.ts:116


type

type: "context";

Description

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

Overrides

Block.type

Defined in

block-kit/blocks.ts:111