Skip to main content

@slack/types / InputBlock

Interface: InputBlock

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

Description​

Collects information from users via block elements.

See​

Extends​

Properties​

block_id?​

optional block_id?: string;

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

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


dispatch_action?​

optional dispatch_action?: boolean;

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

Description​

A boolean that indicates whether or not the use of elements in this block should dispatch a block_actions payload. Defaults to false.


element​

element: InputBlockElement;

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

Description​

A block element.


hint?​

optional hint?: PlainTextElement;

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

Description​

An optional hint that appears below an input element in a lighter grey. It must be a object. Maximum length for the text in this field is 2000 characters.


label​

label: PlainTextElement;

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

Description​

A label that appears above an input element in the form of a PlainTextElement object. Maximum length for the text in this field is 2000 characters.


optional?​

optional optional?: boolean;

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

Description​

A boolean that indicates whether the input element may be empty when a user submits the modal. Defaults to false.


type​

type: "input";

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

Description​

The type of block. For an input block, type is always input.

Overrides​

Block.type