Skip to main content

@slack/web-api / PlainTextInput

Interface: PlainTextInput

Defined in: packages/types/dist/block-kit/block-elements.d.ts:534

Description​

Allows users to enter freeform text data into a single-line or multi-line field.

See​

Extends​

Properties​

action_id?​

optional action_id?: string;

Defined in: packages/types/dist/block-kit/extensions.d.ts:12

@description: An identifier for this action. You can use this when you receive an interaction payload to identify the source of the action. Should be unique among all other action_ids in the containing block. Maximum length for this field is 255 characters.

Inherited from​

Actionable.action_id


dispatch_action_config?​

optional dispatch_action_config?: DispatchActionConfig;

Defined in: packages/types/dist/block-kit/extensions.d.ts:28

Description​

A DispatchActionConfig object that determines when during text input the element returns a `block_actions` payload.

Inherited from​

Dispatchable.dispatch_action_config


focus_on_load?​

optional focus_on_load?: boolean;

Defined in: packages/types/dist/block-kit/extensions.d.ts:36

Description​

Indicates whether the element will be set to auto focus within the `view` object. Only one element can be set to true. Defaults to false.

Inherited from​

Focusable.focus_on_load


initial_value?​

optional initial_value?: string;

Defined in: packages/types/dist/block-kit/block-elements.d.ts:542

Description​

The initial value in the plain-text input when it is loaded.


max_length?​

optional max_length?: number;

Defined in: packages/types/dist/block-kit/block-elements.d.ts:557

Description​

The maximum length of input that the user can provide. If the user provides more, they will receive an error.


min_length?​

optional min_length?: number;

Defined in: packages/types/dist/block-kit/block-elements.d.ts:552

Description​

The minimum length of input that the user must provide. If the user provides less, they will receive an error. Maximum value is 3000.


multiline?​

optional multiline?: boolean;

Defined in: packages/types/dist/block-kit/block-elements.d.ts:547

Description​

Indicates whether the input will be a single line (false) or a larger textarea (true). Defaults to false.


placeholder?​

optional placeholder?: PlainTextElement;

Defined in: packages/types/dist/block-kit/extensions.d.ts:49

Description​

A PlainTextElement object that defines the placeholder text shown on the element. Maximum length for the text field in this object is 150 characters.

Inherited from​

Placeholdable.placeholder


type​

type: "plain_text_input";

Defined in: packages/types/dist/block-kit/block-elements.d.ts:538

Description​

The type of element. In this case type is always plain_text_input.

Overrides​

Actionable.type