Views
Views are app-customized visual areas within modals and Home tabs.
See: https://api.slack.com/reference/surfaces/views.
HomeTabView
HomeTabViews
are used with the views.publish
Web API method.
See: https://api.slack.com/reference/surfaces/views#home.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
blocks |
Union[Block, List[Block]]
|
A list of blocks that defines the content of the view (max 100). |
required |
private_metadata |
Optional[str]
|
a string (max 3000 chars) that will be sent to your app
in |
None
|
callback_id |
Optional[str]
|
A string that will identify submissions of this view. |
None
|
external_id |
Optional[str]
|
A custom identifier that is unique within the views of a given Slack team. |
None
|
Source code in slackblocks/views.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|
ModalView
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
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title |
TextLike
|
heading that appears at the top left of the view. |
required |
blocks |
Union[Block, List[Block]]
|
a list of blocks (max 100) that define the content of the view. |
required |
close |
Optional[TextLike]
|
the text of the close button (max 24 chars) in the view.
Must be |
None
|
submit |
Optional[TextLike]
|
the text of the submit button (max 24 chars) in the view.
Must be |
None
|
private_metadata |
Optional[str]
|
a string (max 3000 chars) that will be sent to your app
in |
None
|
callback_id |
Optional[str]
|
A string that will identify submissions of this view. |
None
|
clear_on_close |
Optional[bool]
|
when |
False
|
notify_on_close |
Optional[bool]
|
when |
False
|
external_id |
Optional[str]
|
A custom identifier that is unique within the views of a given Slack team. |
None
|
submit_disabled |
Optional[bool]
|
when |
False
|
Source code in slackblocks/views.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|