Skip to main content

Interface: SectionBlock

Description

Displays text, possibly alongside block elements. A section can be used as a simple text block, in combination with text fields, or side-by-side with certain block elements.

See

Section block reference.

Extends

Properties

accessory?

optional accessory: SectionBlockAccessory;

Description

One of the compatible element objects.

Defined in

block-kit/blocks.ts:316


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


fields?

optional fields: TextObject[];

Description

Required if no text is provided. An array of text objects. Any text objects included with fields will be rendered in a compact format that allows for 2 columns of side-by-side text. Maximum number of items is 10. Maximum length for the text in each item is 2000 characters. Click here for an example.

Defined in

block-kit/blocks.ts:312


text?

optional text: TextObject;

Description

The text for the block, in the form of a TextObject. Minimum length for the text in this field is 1 and maximum length is 3000 characters. This field is not required if a valid array of fields objects is provided instead.

Defined in

block-kit/blocks.ts:305


type

type: "section";

Description

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

Overrides

Block.type

Defined in

block-kit/blocks.ts:299