URL input element
Welcome to the new home of Slack developer docs!
We're still building and not all features are available quite yet. Enjoy this peek into the future!
Not ready for the future? Return to the past at api.slack.com.
Fields
Fields | Type | Description | Required? |
---|---|---|---|
type | String | The type of element. In this case type is always url_text_input . | Required |
action_id | String | An identifier for the input value when the parent modal is submitted. You can use this when you receive a view_submission payload to identify the value of the input element. Should be unique among all other action_id s in the containing block. Maximum length is 255 characters. | Optional |
initial_value | String | The initial value in the URL input when it is loaded. | Optional |
dispatch_action_config | Object | A dispatch configuration object that determines when during text input the element returns a block_actions payload. | Optional |
focus_on_load | Boolean | 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 . | Optional |
placeholder | Object | A plain_text only text object that defines the placeholder text shown in the URL input. Maximum length for the text in this field is 150 characters. | Optional |
Example
An input block containing a URL-text input element.
{
"type": "input",
"element": {
"type": "url_text_input",
"action_id": "url_text_input-action"
},
"label": {
"type": "plain_text",
"text": "Label",
"emoji": true
}
}