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
| Argument | Type | Description |
|---|---|---|
blocks | Union[Block, List[Block]] | A list of blocks that defines the content of the view (max 100). |
private_metadata | Optional[str] | a string (max 3000 chars) that will be sent to your app in view_submission. |
callback_id | Optional[str] | A string that will identify submissions of this view. |
external_id | Optional[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
| Argument | Type | Description |
|---|---|---|
title | TextLike | heading that appears at the top left of the view. |
blocks | Union[Block, List[Block]] | a list of blocks (max 100) that define the content of the view. |
close | Optional[TextLike] | the text of the close button (max 24 chars) in the view. Must be Text.PLAINTEXT. |
submit | Optional[TextLike] | the text of the submit button (max 24 chars) in the view. Must be Text.PLAINTEXT. |
private_metadata | Optional[str] | a string (max 3000 chars) that will be sent to your app in view_submission. |
callback_id | Optional[str] | A string that will identify submissions of this view. |
clear_on_close | Optional[bool] | when True all views in the model will be cleared whenit is closed. |
notify_on_close | Optional[bool] | when True a view_closed event will be sent when themodal is closed. |
external_id | Optional[str] | A custom identifier that is unique within the views of a given Slack team. |
submit_disabled | Optional[bool] | when True disabled submitting the form until one ormore inputs have been provided. Used only for configuaration models. |