Elements
Interactive and visual element factories used inside Block Kit blocks.
Factories accept camelCase input and return validated Slack wire objects.
button()
button(
input,settings?):SlackObject<"button">
Creates an interactive button.
Input fields
Button label, action identifier, and optional behavior.
| Input field | Type | Description |
|---|---|---|
accessibilityLabel? | string | Accessible label when the visible text is insufficient. |
actionId | string | Identifier returned when the button is selected. |
confirm? | JsonObject | Optional confirmation dialog created with confirmation. |
style? | "primary" | "danger" | Optional visual emphasis. |
text | TextLike | Plain-text label displayed on the button. |
url? | string | Optional URL opened by the button. |
value? | string | Optional application-defined value returned with the interaction. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"button">
A validated Slack button element.
Throws
InvalidUsageError when a field violates Slack's constraints.
ButtonInput
Fields accepted by button.
Properties
| Property | Type | Description |
|---|---|---|
accessibilityLabel? | string | Accessible label when the visible text is insufficient. |
actionId | string | Identifier returned when the button is selected. |
confirm? | JsonObject | Optional confirmation dialog created with confirmation. |
style? | "primary" | "danger" | Optional visual emphasis. |
text | TextLike | Plain-text label displayed on the button. |
url? | string | Optional URL opened by the button. |
value? | string | Optional application-defined value returned with the interaction. |
channelMultiSelect()
channelMultiSelect(
input,settings?):SlackObject<"multi_channels_select">
Creates a multi-select menu populated with public channels visible to the current user.
Input fields
Channel selection, confirmation, focus, and placeholder behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialChannels? | string[] | Public channel IDs selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of channels that may be selected; the minimum is one. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"multi_channels_select">
A validated Slack multi_channels_select element.
Throws
InvalidUsageError when an identifier, placeholder, or selection constraint is invalid.
ChannelMultiSelectInput
Fields accepted by channelMultiSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialChannels? | string[] | Public channel IDs selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of channels that may be selected; the minimum is one. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
channelSelect()
channelSelect(
input,settings?):SlackObject<"channels_select">
Creates a single-select menu populated with public channels visible to the current user.
Input fields
Initial channel, response URL, confirmation, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a channel is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialChannel? | string | Public channel ID selected when the menu first loads. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
responseUrlEnabled? | boolean | Include a response_url in a parent modal's submission payload. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"channels_select">
A validated Slack channels_select element.
Throws
InvalidUsageError when an identifier, placeholder, or initial selection is invalid.
ChannelSelectInput
Fields accepted by channelSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a channel is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialChannel? | string | Public channel ID selected when the menu first loads. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
responseUrlEnabled? | boolean | Include a response_url in a parent modal's submission payload. |
checkboxes()
checkboxes(
input,settings?):SlackObject<"checkboxes">
Creates a checkbox group.
Input fields
Action identifier, options, and optional Slack checkbox fields.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the checkbox selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the changed selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOptions? | JsonObject[] | Options from options that are selected when the element first loads. |
options | JsonObject[] | Up to ten option objects displayed as checkboxes. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"checkboxes">
A validated Slack checkboxes element.
Throws
InvalidUsageError when options or identifiers violate Slack's constraints.
CheckboxesInput
Fields accepted by checkboxes.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the checkbox selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the changed selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOptions? | JsonObject[] | Options from options that are selected when the element first loads. |
options | JsonObject[] | Up to ten option objects displayed as checkboxes. |
conversationMultiSelect()
conversationMultiSelect(
input,settings?):SlackObject<"multi_conversations_select">
Creates a multi-select menu of public channels, private channels, DMs, and group DMs.
Input fields
Conversation filters, initial selection, confirmation, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
defaultToCurrentConversation? | boolean | Select the conversation from which the view was opened by default. |
filter? | JsonObject | Filter controlling which public channels, private channels, DMs, and group DMs appear. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialConversations? | string[] | Conversation IDs selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of conversations that may be selected; the minimum is one. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"multi_conversations_select">
A validated Slack multi_conversations_select element.
Throws
InvalidUsageError when an identifier, placeholder, filter, or selection is invalid.
ConversationMultiSelectInput
Fields accepted by conversationMultiSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
defaultToCurrentConversation? | boolean | Select the conversation from which the view was opened by default. |
filter? | JsonObject | Filter controlling which public channels, private channels, DMs, and group DMs appear. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialConversations? | string[] | Conversation IDs selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of conversations that may be selected; the minimum is one. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
conversationSelect()
conversationSelect(
input,settings?):SlackObject<"conversations_select">
Creates a single-select menu of public channels, private channels, DMs, and group DMs.
Input fields
Conversation filter, initial selection, response URL, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a conversation is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
defaultToCurrentConversation? | boolean | Select the conversation from which the view was opened by default. |
filter? | JsonObject | Filter controlling which public channels, private channels, DMs, and group DMs appear. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialConversation? | string | Conversation ID selected when the menu first loads. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
responseUrlEnabled? | boolean | Include a response_url in a parent modal's submission payload. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"conversations_select">
A validated Slack conversations_select element.
Throws
InvalidUsageError when an identifier, placeholder, filter, or selection is invalid.
ConversationSelectInput
Fields accepted by conversationSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a conversation is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
defaultToCurrentConversation? | boolean | Select the conversation from which the view was opened by default. |
filter? | JsonObject | Filter controlling which public channels, private channels, DMs, and group DMs appear. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialConversation? | string | Conversation ID selected when the menu first loads. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
responseUrlEnabled? | boolean | Include a response_url in a parent modal's submission payload. |
datePicker()
datePicker(
input,settings?):SlackObject<"datepicker">
Creates a date picker.
Input fields
Action identifier and optional Slack date-picker fields.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a date is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown after a date is selected. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialDate? | string | Initially selected date in YYYY-MM-DD format. |
placeholder? | TextLike | Plain-text prompt shown before a date is selected, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"datepicker">
A validated Slack datepicker element.
Throws
InvalidUsageError when a field violates Slack's constraints.
DatePickerInput
Fields accepted by datePicker.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a date is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown after a date is selected. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialDate? | string | Initially selected date in YYYY-MM-DD format. |
placeholder? | TextLike | Plain-text prompt shown before a date is selected, up to 150 characters. |
dateTimePicker()
dateTimePicker(
input,settings?):SlackObject<"datetimepicker">
Creates a date-and-time picker.
Input fields
Action identifier and optional Slack date-time-picker fields.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a date and time are selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown after a date and time are selected. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialDateTime? | number | Initially selected date and time as a Unix timestamp in seconds. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"datetimepicker">
A validated Slack datetimepicker element.
Throws
InvalidUsageError when a field violates Slack's constraints.
DateTimePickerInput
Fields accepted by dateTimePicker.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a date and time are selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown after a date and time are selected. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialDateTime? | number | Initially selected date and time as a Unix timestamp in seconds. |
EmailElementInput
Fields accepted by emailInput.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted email value, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when typing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | string | Email address present when the input first loads. |
placeholder? | TextLike | Plain-text prompt shown in the empty input, up to 150 characters. |
emailInput()
emailInput(
input,settings?):SlackObject<"email_text_input">
Creates an email-address input.
Input fields
Action identifier and optional Slack email-input fields.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted email value, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when typing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | string | Email address present when the input first loads. |
placeholder? | TextLike | Plain-text prompt shown in the empty input, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"email_text_input">
A validated Slack email_text_input element.
Throws
InvalidUsageError when a field violates Slack's constraints.
externalMultiSelect()
externalMultiSelect(
input,settings?):SlackObject<"multi_external_select">
Creates a multi-select menu whose options are loaded from the app's configured Options Load URL.
Input fields
Query threshold, initial options, confirmation, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOptions? | JsonObject[] | Options selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of options that may be selected; the minimum is one. |
minQueryLength? | number | Minimum typed characters before Slack requests options; defaults to three. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"multi_external_select">
A validated Slack multi_external_select element.
Throws
InvalidUsageError when an identifier, placeholder, query, or selection is invalid.
ExternalMultiSelectInput
Fields accepted by externalMultiSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOptions? | JsonObject[] | Options selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of options that may be selected; the minimum is one. |
minQueryLength? | number | Minimum typed characters before Slack requests options; defaults to three. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
externalSelect()
externalSelect(
input,settings?):SlackObject<"external_select">
Creates a single-select menu whose options are loaded from the app's Options Load URL.
Input fields
Query threshold, initial option, confirmation, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when an option is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOption? | JsonObject | Option selected when the menu first loads. |
minQueryLength? | number | Minimum typed characters before Slack requests options; defaults to three. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"external_select">
A validated Slack external_select element.
Throws
InvalidUsageError when an identifier, placeholder, query, or option is invalid.
ExternalSelectInput
Fields accepted by externalSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when an option is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOption? | JsonObject | Option selected when the menu first loads. |
minQueryLength? | number | Minimum typed characters before Slack requests options; defaults to three. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
feedbackButton()
feedbackButton(
input,settings?):JsonObject
Creates one choice used by a feedback-buttons element.
Input fields
Choice text, returned value, and optional accessible label.
| Input field | Type | Description |
|---|---|---|
accessibilityLabel? | string | Accessible label when the visible text is insufficient. |
text | TextLike | Plain-text feedback choice. |
value | string | Application-defined value returned with the feedback. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
A validated feedback-button object.
Throws
InvalidUsageError when a field exceeds Slack's limits.
FeedbackButtonInput
Fields accepted by feedbackButton.
Properties
| Property | Type | Description |
|---|---|---|
accessibilityLabel? | string | Accessible label when the visible text is insufficient. |
text | TextLike | Plain-text feedback choice. |
value | string | Application-defined value returned with the feedback. |
feedbackButtons()
feedbackButtons(
input,settings?):SlackObject<"feedback_buttons">
Creates a paired positive/negative feedback control.
Input fields
Positive and negative feedback buttons plus an optional action identifier.
| Input field | Type | Description |
|---|---|---|
actionId? | string | Optional identifier returned with the interaction. |
negativeButton | JsonObject | Negative choice created with feedbackButton. |
positiveButton | JsonObject | Positive choice created with feedbackButton. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"feedback_buttons">
A validated Slack feedback_buttons element.
Throws
InvalidUsageError when either feedback choice is invalid.
fileInput()
fileInput(
input,settings?):SlackObject<"file_input">
Creates a file-upload input.
Input fields
Action identifier, allowed extensions, and maximum file count.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned with submitted files. |
filetypes? | string[] | Optional allowed file extensions. |
maxFiles? | number | Maximum files accepted, between 1 and 10. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"file_input">
A validated Slack file_input element.
Throws
InvalidUsageError when maxFiles is outside 1–10.
iconButton()
iconButton(
input,settings?):SlackObject<"icon_button">
Creates a compact icon action for a context-actions block.
Input fields
Accessible text, icon behavior, and optional visibility restrictions.
| Input field | Type | Description |
|---|---|---|
accessibilityLabel? | string | Accessible label when the text is insufficient. |
actionId? | string | Optional identifier returned with the interaction. |
confirm? | JsonObject | Optional confirmation dialog. |
icon? | "trash" | Icon name. Slack currently accepts only trash. |
text | TextLike | Plain-text description of the icon action. |
value? | string | Optional application-defined interaction value. |
visibleToUserIds? | string[] | Up to ten user IDs allowed to see the action. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"icon_button">
A validated Slack icon_button element.
Throws
InvalidUsageError when the icon or visible-user list is invalid.
imageElement()
imageElement(
input,settings?):SlackObject<"image">
Creates an image element from a URL or Slack-hosted file.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | ImageElementInput | Accessible text and exactly one image source. |
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"image">
A validated Slack image element.
Throws
InvalidUsageError when both or neither image source is provided.
ImageElementInput
ImageElementInput = {
altText:string;imageUrl:string;slackFile?:never; } | {altText:string;imageUrl?:never;slackFile:JsonObject; }
URL-backed or Slack-file-backed image fields accepted by imageElement.
Union Members
Type Literal
{ altText: string; imageUrl: string; slackFile?: never; }
| Name | Type | Description |
|---|---|---|
altText | string | Accessible plain-text summary of the image. |
imageUrl | string | Public image URL, up to 3,000 characters. |
slackFile? | never | A Slack file cannot be combined with imageUrl. |
Type Literal
{ altText: string; imageUrl?: never; slackFile: JsonObject; }
| Name | Type | Description |
|---|---|---|
altText | string | Accessible plain-text summary of the image. |
imageUrl? | never | An image URL cannot be combined with slackFile. |
slackFile | JsonObject | Slack-hosted file reference created with slackFile. |
NumberElementInput
Fields accepted by numberInput.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted numeric value, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when typing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | string | Numeric text present when the input first loads. |
isDecimalAllowed? | boolean | Whether the input accepts decimal values as well as whole numbers. |
maxValue? | number | Maximum accepted value; it cannot be less than minValue. |
minValue? | number | Minimum accepted value; it cannot exceed maxValue. |
placeholder? | TextLike | Plain-text prompt shown in the empty input, up to 150 characters. |
numberInput()
numberInput(
input,settings?):SlackObject<"number_input">
Creates a single-line input for whole or decimal numeric values.
Input fields
Decimal behavior, initial value, range, dispatch, and display settings.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted numeric value, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when typing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | string | Numeric text present when the input first loads. |
isDecimalAllowed? | boolean | Whether the input accepts decimal values as well as whole numbers. |
maxValue? | number | Maximum accepted value; it cannot be less than minValue. |
minValue? | number | Minimum accepted value; it cannot exceed maxValue. |
placeholder? | TextLike | Plain-text prompt shown in the empty input, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"number_input">
A validated Slack number_input element.
Throws
InvalidUsageError when an identifier, placeholder, or numeric range is invalid.
overflow()
overflow(
input,settings?):SlackObject<"overflow">
Creates an overflow menu.
Input fields
Action identifier, two to five options, and optional Slack fields.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when an option is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown after an option is selected. |
options | JsonObject[] | Between two and five option objects displayed in the compact menu. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"overflow">
A validated Slack overflow element.
Throws
InvalidUsageError when the option list violates Slack's constraints.
OverflowInput
Fields accepted by overflow.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when an option is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown after an option is selected. |
options | JsonObject[] | Between two and five option objects displayed in the compact menu. |
PlainTextElementInput
Fields accepted by plainTextInput.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted text value, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when typing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | string | Text present when the input first loads. |
maxLength? | number | Maximum number of characters the user may enter, between 1 and 3000. |
minLength? | number | Minimum number of characters the user must enter, between 0 and 3000. |
multiline? | boolean | Whether the input is a multi-line textarea instead of a single line. |
placeholder? | TextLike | Plain-text prompt shown in the empty input, up to 150 characters. |
plainTextInput()
plainTextInput(
input,settings?):SlackObject<"plain_text_input">
Creates a single- or multi-line freeform text input for a modal or App Home tab.
Input fields
Initial text, length limits, multiline, dispatch, and display settings.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted text value, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when typing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | string | Text present when the input first loads. |
maxLength? | number | Maximum number of characters the user may enter, between 1 and 3000. |
minLength? | number | Minimum number of characters the user must enter, between 0 and 3000. |
multiline? | boolean | Whether the input is a multi-line textarea instead of a single line. |
placeholder? | TextLike | Plain-text prompt shown in the empty input, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"plain_text_input">
A validated Slack plain_text_input element.
Throws
InvalidUsageError when an identifier, placeholder, or length constraint is invalid.
radioButtons()
radioButtons(
input,settings?):SlackObject<"radio_buttons">
Creates a radio-button group.
Input fields
Action identifier, options, and optional Slack fields.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOption? | JsonObject | Option from options selected when the element first loads. |
options | JsonObject[] | Up to ten options displayed as radio buttons. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"radio_buttons">
A validated Slack radio_buttons element.
Throws
InvalidUsageError when options or identifiers violate Slack's constraints.
RadioButtonsInput
Fields accepted by radioButtons.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOption? | JsonObject | Option from options selected when the element first loads. |
options | JsonObject[] | Up to ten options displayed as radio buttons. |
RichTextElementInput
Fields accepted by richTextInput.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted rich-text value, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when editing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | JsonObject | Rich-text content present when the editor first loads. |
maxLines? | number | Maximum visible editor lines before scrolling, between 1 and 100. |
minLines? | number | Minimum visible editor lines before scrolling, between 1 and 100. |
placeholder? | TextLike | Plain-text prompt shown in the empty editor, up to 150 characters. |
richTextInput()
richTextInput(
input,settings?):SlackObject<"rich_text_input">
Creates a rich-text input for a modal or App Home tab.
Input fields
Initial content, dispatch configuration, line limits, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted rich-text value, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when editing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | JsonObject | Rich-text content present when the editor first loads. |
maxLines? | number | Maximum visible editor lines before scrolling, between 1 and 100. |
minLines? | number | Minimum visible editor lines before scrolling, between 1 and 100. |
placeholder? | TextLike | Plain-text prompt shown in the empty editor, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"rich_text_input">
A validated Slack rich_text_input element.
Throws
InvalidUsageError when an identifier, placeholder, content, or line limit is invalid.
staticMultiSelect()
staticMultiSelect(
input,settings?):SlackObject<"multi_static_select">
Creates a multi-select menu from options embedded directly in the Block Kit payload.
Input fields
Options or option groups, initial selection, confirmation, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOptions? | JsonObject[] | Options selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of options that may be selected; the minimum is one. |
optionGroups? | JsonObject[] | Up to 100 groups of options; mutually exclusive with options. |
options? | JsonObject[] | Up to 100 directly supplied options; mutually exclusive with optionGroups. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"multi_static_select">
A validated Slack multi_static_select element.
Throws
InvalidUsageError when options, identifiers, or selection constraints are invalid.
StaticMultiSelectInput
Fields accepted by staticMultiSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOptions? | JsonObject[] | Options selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of options that may be selected; the minimum is one. |
optionGroups? | JsonObject[] | Up to 100 groups of options; mutually exclusive with options. |
options? | JsonObject[] | Up to 100 directly supplied options; mutually exclusive with optionGroups. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
staticSelect()
staticSelect(
input,settings?):SlackObject<"static_select">
Creates a single-select menu from options embedded directly in the Block Kit payload.
Input fields
Options or option groups, initial option, confirmation, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when an option is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOption? | JsonObject | Option selected when the menu first loads. |
optionGroups? | JsonObject[] | Up to 100 groups of options; mutually exclusive with options. |
options? | JsonObject[] | Up to 100 directly supplied options; mutually exclusive with optionGroups. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"static_select">
A validated Slack static_select element.
Throws
InvalidUsageError when options, identifiers, or selection constraints are invalid.
StaticSelectInput
Fields accepted by staticSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when an option is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialOption? | JsonObject | Option selected when the menu first loads. |
optionGroups? | JsonObject[] | Up to 100 groups of options; mutually exclusive with options. |
options? | JsonObject[] | Up to 100 directly supplied options; mutually exclusive with optionGroups. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
timePicker()
timePicker(
input,settings?):SlackObject<"timepicker">
Creates a time picker.
Input fields
Initial time, timezone, confirmation, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a time is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown after a time is selected. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialTime? | string | Initially selected time in 24-hour HH:mm format. |
placeholder? | TextLike | Plain-text prompt shown before a time is selected, up to 150 characters. |
timezone? | string | IANA timezone displayed as supporting text and returned with interactions. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"timepicker">
A validated Slack timepicker element.
Throws
InvalidUsageError when an identifier, placeholder, time, or timezone is invalid.
TimePickerInput
Fields accepted by timePicker.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a time is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown after a time is selected. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialTime? | string | Initially selected time in 24-hour HH:mm format. |
placeholder? | TextLike | Plain-text prompt shown before a time is selected, up to 150 characters. |
timezone? | string | IANA timezone displayed as supporting text and returned with interactions. |
UrlElementInput
Fields accepted by urlInput.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted URL, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when typing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | string | URL present when the input first loads. |
placeholder? | TextLike | Plain-text prompt shown in the empty input, up to 150 characters. |
urlInput()
urlInput(
input,settings?):SlackObject<"url_text_input">
Creates a URL input.
Input fields
Initial URL, dispatch configuration, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier used to find the submitted URL, up to 255 characters. |
dispatchActionConfig? | JsonObject | Configuration controlling when typing dispatches a block_actions payload. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialValue? | string | URL present when the input first loads. |
placeholder? | TextLike | Plain-text prompt shown in the empty input, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"url_text_input">
A validated Slack url_text_input element.
Throws
InvalidUsageError when an identifier, placeholder, or initial URL is invalid.
urlSource()
urlSource(
input,settings?):SlackObject<"url">
Creates a source link for a task card.
Input fields
Public URL and human-readable link text.
| Input field | Type | Description |
|---|---|---|
text | string | Human-readable source label. |
url | string | Public source URL. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"url">
A validated Slack url source element.
Throws
InvalidUsageError when a field violates Slack's constraints.
userMultiSelect()
userMultiSelect(
input,settings?):SlackObject<"multi_users_select">
Creates a multi-select menu populated with users visible in the active workspace.
Input fields
Initial users, confirmation, selection limit, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialUsers? | string[] | User IDs selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of users that may be selected; the minimum is one. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"multi_users_select">
A validated Slack multi_users_select element.
Throws
InvalidUsageError when an identifier, placeholder, or selection constraint is invalid.
UserMultiSelectInput
Fields accepted by userMultiSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when the selection changes, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialUsers? | string[] | User IDs selected when the menu first loads. |
maxSelectedItems? | number | Maximum number of users that may be selected; the minimum is one. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
userSelect()
userSelect(
input,settings?):SlackObject<"users_select">
Creates a single-select menu populated with users visible in the active workspace.
Input fields
Initial user, confirmation, and display behavior.
| Input field | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a user is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialUser? | string | User ID selected when the menu first loads. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"users_select">
A validated Slack users_select element.
Throws
InvalidUsageError when an identifier, placeholder, or initial user is invalid.
UserSelectInput
Fields accepted by userSelect.
Properties
| Property | Type | Description |
|---|---|---|
actionId | string | Identifier returned when a user is selected, up to 255 characters. |
confirm? | JsonObject | Optional confirmation dialog shown before the selection is submitted. |
focusOnLoad? | boolean | Whether this element receives focus when its containing view opens. |
initialUser? | string | User ID selected when the menu first loads. |
placeholder? | TextLike | Plain-text prompt shown before a selection, up to 150 characters. |
workflowButton()
workflowButton(
input,settings?):SlackObject<"workflow_button">
Creates a button that launches a Slack workflow.
Input fields
Button label, workflow trigger, and optional interaction behavior.
| Input field | Type | Description |
|---|---|---|
accessibilityLabel? | string | Accessible label when the visible text is insufficient. |
actionId? | string | Optional interaction identifier. |
confirm? | JsonObject | Optional confirmation dialog. |
style? | "primary" | "danger" | Optional visual emphasis. |
text | TextLike | Plain-text label displayed on the button. |
workflow | JsonObject | Workflow object created with workflow. |
Settings
| Setting | Type | Description |
|---|---|---|
settings | FactorySettings | Per-call validation settings. |
Returns
SlackObject<"workflow_button">
A validated Slack workflow_button element.
Throws
InvalidUsageError when text or identifiers violate Slack's constraints.
WorkflowButtonInput
Fields accepted by workflowButton.
Properties
| Property | Type | Description |
|---|---|---|
accessibilityLabel? | string | Accessible label when the visible text is insufficient. |
actionId? | string | Optional interaction identifier. |
confirm? | JsonObject | Optional confirmation dialog. |
style? | "primary" | "danger" | Optional visual emphasis. |
text | TextLike | Plain-text label displayed on the button. |
workflow | JsonObject | Workflow object created with workflow. |