Skip to main content

Views

HomeTabView

Class

HomeTabView(blocks: Union[Block, List[Block]], private_metadata: Optional[str] = None, callback_id: Optional[str] = None, external_id: Optional[str] = None)

HomeTabViews are used with the views.publish Web API method.

See: https://api.slack.com/reference/surfaces/views#home.

Arguments

ArgumentTypeDescription
blocksUnion[Block, List[Block]]A list of blocks that defines the content of the view (max 100).
private_metadataOptional[str]a string (max 3000 chars) that will be sent to your app
in view_submission.
callback_idOptional[str]A string that will identify submissions of this view.
external_idOptional[str]A custom identifier that is unique within the views of a
given Slack team.

ModalView

Class

ModalView(title: TextLike, blocks: Union[Block, List[Block]], close: Optional[TextLike] = None, submit: Optional[TextLike] = None, private_metadata: Optional[str] = None, callback_id: Optional[str] = None, clear_on_close: Optional[bool] = False, notify_on_close: Optional[bool] = False, external_id: Optional[str] = None, submit_disabled: Optional[bool] = False)

Modal views are used with the views.open, views.update and views.push Slack Web API methods.

See: https://api.slack.com/reference/surfaces/views#modal

Arguments

ArgumentTypeDescription
titleTextLikeheading that appears at the top left of the view.
blocksUnion[Block, List[Block]]a list of blocks (max 100) that define the content of the view.
closeOptional[TextLike]the text of the close button (max 24 chars) in the view.
Must be Text.PLAINTEXT.
submitOptional[TextLike]the text of the submit button (max 24 chars) in the view.
Must be Text.PLAINTEXT.
private_metadataOptional[str]a string (max 3000 chars) that will be sent to your app
in view_submission.
callback_idOptional[str]A string that will identify submissions of this view.
clear_on_closeOptional[bool]when True all views in the model will be cleared when
it is closed.
notify_on_closeOptional[bool]when True a view_closed event will be sent when the
modal is closed.
external_idOptional[str]A custom identifier that is unique within the views of a
given Slack team.
submit_disabledOptional[bool]when True disabled submitting the form until one or
more inputs have been provided. Used only for
configuaration models.