Interface: SectionBlock
Defined in: block-kit/blocks.ts:295
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
Extends
Properties
accessory?
optional accessory: SectionBlockAccessory;
Defined in: block-kit/blocks.ts:316
Description
One of the compatible element objects.
block_id?
optional block_id: string;
Defined in: block-kit/blocks.ts:39
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
expand?
optional expand: boolean;
Defined in: block-kit/blocks.ts:320
Whether or not this section block's text should always expand when rendered. If false or not provided, it may be rendered with a 'see more' option to expand and show the full text. For AI Assistant apps, this allows the app to post long messages without users needing to click 'see more' to expand the message.
fields?
optional fields: TextObject[];
Defined in: block-kit/blocks.ts:312
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.
text?
optional text: TextObject;
Defined in: block-kit/blocks.ts:305
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.
type
type: "section";
Defined in: block-kit/blocks.ts:299
Description
The type of block. For a section block, type
is always section
.