Skip to main content

@slack/types / ModalView

Interface: ModalView

Defined in: views.ts:31

Extends​

  • BaseView

Properties​

blocks​

blocks: AnyBlock[];

Defined in: views.ts:6

Description​

An array of AnyBlock that defines the content of the view. Max of 100 blocks.

Inherited from​

BaseView.blocks

callback_id?​

optional callback_id?: string;

Defined in: views.ts:19

Description​

An identifier to recognize interactions and submissions of this particular view. Don't use this to store sensitive information (use private_metadata instead). Maximum length of 255 characters.

See​

Handling and responding to interactions.

Inherited from​

BaseView.callback_id

clear_on_close?​

optional clear_on_close?: boolean;

Defined in: views.ts:54

Description​

When set to true, clicking on the close button will clear all views in a modal and close it. Defaults to false.


close?​

optional close?: PlainTextElement;

Defined in: views.ts:43

Description​

An optional PlainTextElement that defines the text displayed in the close button at the bottom-right of the view. Maximum length of 24 characters.


external_id?​

optional external_id?: string;

Defined in: views.ts:21

Description​

A custom identifier that must be unique for all views on a per-team basis.

Inherited from​

BaseView.external_id

notify_on_close?​

optional notify_on_close?: boolean;

Defined in: views.ts:60

Description​

Indicates whether Slack will send your app a `view_closed` event when a user clicks the close button. Defaults to false.


private_metadata?​

optional private_metadata?: string;

Defined in: views.ts:13

Description​

String that will be sent to your app in `view_submission` and `block_actions` events. Maximum length of 3000 characters.

Inherited from​

BaseView.private_metadata

submit?​

optional submit?: PlainTextElement;

Defined in: views.ts:49

Description​

An optional PlainTextElement that defines the text displayed in the submit button at the bottom-right of the view. submit is required when an input block is within the blocks array. Max length of 24 characters.


title​

title: PlainTextElement;

Defined in: views.ts:38

Description​

The title that appears in the top-left of the modal. Must be a PlainTextElement with a maximum length of 24 characters.


type​

type: "modal";

Defined in: views.ts:33

Description​

The type of view. Set to modal for modals.