Skip to main content

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 fieldTypeDescription
accessibilityLabel?stringAccessible label when the visible text is insufficient.
actionIdstringIdentifier returned when the button is selected.
confirm?JsonObjectOptional confirmation dialog created with confirmation.
style?"primary" | "danger"Optional visual emphasis.
textTextLikePlain-text label displayed on the button.
url?stringOptional URL opened by the button.
value?stringOptional application-defined value returned with the interaction.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
accessibilityLabel?stringAccessible label when the visible text is insufficient.
actionIdstringIdentifier returned when the button is selected.
confirm?JsonObjectOptional confirmation dialog created with confirmation.
style?"primary" | "danger"Optional visual emphasis.
textTextLikePlain-text label displayed on the button.
url?stringOptional URL opened by the button.
value?stringOptional 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 fieldTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialChannels?string[]Public channel IDs selected when the menu first loads.
maxSelectedItems?numberMaximum number of channels that may be selected; the minimum is one.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialChannels?string[]Public channel IDs selected when the menu first loads.
maxSelectedItems?numberMaximum number of channels that may be selected; the minimum is one.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier returned when a channel is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialChannel?stringPublic channel ID selected when the menu first loads.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.
responseUrlEnabled?booleanInclude a response_url in a parent modal's submission payload.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when a channel is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialChannel?stringPublic channel ID selected when the menu first loads.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.
responseUrlEnabled?booleanInclude 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 fieldTypeDescription
actionIdstringIdentifier returned when the checkbox selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the changed selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOptions?JsonObject[]Options from options that are selected when the element first loads.
optionsJsonObject[]Up to ten option objects displayed as checkboxes.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when the checkbox selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the changed selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOptions?JsonObject[]Options from options that are selected when the element first loads.
optionsJsonObject[]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 fieldTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
defaultToCurrentConversation?booleanSelect the conversation from which the view was opened by default.
filter?JsonObjectFilter controlling which public channels, private channels, DMs, and group DMs appear.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialConversations?string[]Conversation IDs selected when the menu first loads.
maxSelectedItems?numberMaximum number of conversations that may be selected; the minimum is one.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
defaultToCurrentConversation?booleanSelect the conversation from which the view was opened by default.
filter?JsonObjectFilter controlling which public channels, private channels, DMs, and group DMs appear.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialConversations?string[]Conversation IDs selected when the menu first loads.
maxSelectedItems?numberMaximum number of conversations that may be selected; the minimum is one.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier returned when a conversation is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
defaultToCurrentConversation?booleanSelect the conversation from which the view was opened by default.
filter?JsonObjectFilter controlling which public channels, private channels, DMs, and group DMs appear.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialConversation?stringConversation ID selected when the menu first loads.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.
responseUrlEnabled?booleanInclude a response_url in a parent modal's submission payload.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when a conversation is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
defaultToCurrentConversation?booleanSelect the conversation from which the view was opened by default.
filter?JsonObjectFilter controlling which public channels, private channels, DMs, and group DMs appear.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialConversation?stringConversation ID selected when the menu first loads.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.
responseUrlEnabled?booleanInclude 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 fieldTypeDescription
actionIdstringIdentifier returned when a date is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown after a date is selected.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialDate?stringInitially selected date in YYYY-MM-DD format.
placeholder?TextLikePlain-text prompt shown before a date is selected, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when a date is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown after a date is selected.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialDate?stringInitially selected date in YYYY-MM-DD format.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier returned when a date and time are selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown after a date and time are selected.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialDateTime?numberInitially selected date and time as a Unix timestamp in seconds.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when a date and time are selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown after a date and time are selected.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialDateTime?numberInitially selected date and time as a Unix timestamp in seconds.

EmailElementInput

Fields accepted by emailInput.

Properties

PropertyTypeDescription
actionIdstringIdentifier used to find the submitted email value, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when typing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?stringEmail address present when the input first loads.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier used to find the submitted email value, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when typing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?stringEmail address present when the input first loads.
placeholder?TextLikePlain-text prompt shown in the empty input, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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 fieldTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOptions?JsonObject[]Options selected when the menu first loads.
maxSelectedItems?numberMaximum number of options that may be selected; the minimum is one.
minQueryLength?numberMinimum typed characters before Slack requests options; defaults to three.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOptions?JsonObject[]Options selected when the menu first loads.
maxSelectedItems?numberMaximum number of options that may be selected; the minimum is one.
minQueryLength?numberMinimum typed characters before Slack requests options; defaults to three.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier returned when an option is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOption?JsonObjectOption selected when the menu first loads.
minQueryLength?numberMinimum typed characters before Slack requests options; defaults to three.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when an option is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOption?JsonObjectOption selected when the menu first loads.
minQueryLength?numberMinimum typed characters before Slack requests options; defaults to three.
placeholder?TextLikePlain-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 fieldTypeDescription
accessibilityLabel?stringAccessible label when the visible text is insufficient.
textTextLikePlain-text feedback choice.
valuestringApplication-defined value returned with the feedback.

Settings

SettingTypeDescription
settingsFactorySettingsPer-call validation settings.

Returns

JsonObject

A validated feedback-button object.

Throws

InvalidUsageError when a field exceeds Slack's limits.


FeedbackButtonInput

Fields accepted by feedbackButton.

Properties

PropertyTypeDescription
accessibilityLabel?stringAccessible label when the visible text is insufficient.
textTextLikePlain-text feedback choice.
valuestringApplication-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 fieldTypeDescription
actionId?stringOptional identifier returned with the interaction.
negativeButtonJsonObjectNegative choice created with feedbackButton.
positiveButtonJsonObjectPositive choice created with feedbackButton.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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 fieldTypeDescription
actionIdstringIdentifier returned with submitted files.
filetypes?string[]Optional allowed file extensions.
maxFiles?numberMaximum files accepted, between 1 and 10.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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 fieldTypeDescription
accessibilityLabel?stringAccessible label when the text is insufficient.
actionId?stringOptional identifier returned with the interaction.
confirm?JsonObjectOptional confirmation dialog.
icon?"trash"Icon name. Slack currently accepts only trash.
textTextLikePlain-text description of the icon action.
value?stringOptional application-defined interaction value.
visibleToUserIds?string[]Up to ten user IDs allowed to see the action.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

ParameterTypeDescription
inputImageElementInputAccessible text and exactly one image source.
settingsFactorySettingsPer-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; }

NameTypeDescription
altTextstringAccessible plain-text summary of the image.
imageUrlstringPublic image URL, up to 3,000 characters.
slackFile?neverA Slack file cannot be combined with imageUrl.

Type Literal

{ altText: string; imageUrl?: never; slackFile: JsonObject; }

NameTypeDescription
altTextstringAccessible plain-text summary of the image.
imageUrl?neverAn image URL cannot be combined with slackFile.
slackFileJsonObjectSlack-hosted file reference created with slackFile.

NumberElementInput

Fields accepted by numberInput.

Properties

PropertyTypeDescription
actionIdstringIdentifier used to find the submitted numeric value, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when typing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?stringNumeric text present when the input first loads.
isDecimalAllowed?booleanWhether the input accepts decimal values as well as whole numbers.
maxValue?numberMaximum accepted value; it cannot be less than minValue.
minValue?numberMinimum accepted value; it cannot exceed maxValue.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier used to find the submitted numeric value, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when typing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?stringNumeric text present when the input first loads.
isDecimalAllowed?booleanWhether the input accepts decimal values as well as whole numbers.
maxValue?numberMaximum accepted value; it cannot be less than minValue.
minValue?numberMinimum accepted value; it cannot exceed maxValue.
placeholder?TextLikePlain-text prompt shown in the empty input, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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 fieldTypeDescription
actionIdstringIdentifier returned when an option is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown after an option is selected.
optionsJsonObject[]Between two and five option objects displayed in the compact menu.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when an option is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown after an option is selected.
optionsJsonObject[]Between two and five option objects displayed in the compact menu.

PlainTextElementInput

Fields accepted by plainTextInput.

Properties

PropertyTypeDescription
actionIdstringIdentifier used to find the submitted text value, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when typing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?stringText present when the input first loads.
maxLength?numberMaximum number of characters the user may enter, between 1 and 3000.
minLength?numberMinimum number of characters the user must enter, between 0 and 3000.
multiline?booleanWhether the input is a multi-line textarea instead of a single line.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier used to find the submitted text value, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when typing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?stringText present when the input first loads.
maxLength?numberMaximum number of characters the user may enter, between 1 and 3000.
minLength?numberMinimum number of characters the user must enter, between 0 and 3000.
multiline?booleanWhether the input is a multi-line textarea instead of a single line.
placeholder?TextLikePlain-text prompt shown in the empty input, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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 fieldTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOption?JsonObjectOption from options selected when the element first loads.
optionsJsonObject[]Up to ten options displayed as radio buttons.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOption?JsonObjectOption from options selected when the element first loads.
optionsJsonObject[]Up to ten options displayed as radio buttons.

RichTextElementInput

Fields accepted by richTextInput.

Properties

PropertyTypeDescription
actionIdstringIdentifier used to find the submitted rich-text value, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when editing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?JsonObjectRich-text content present when the editor first loads.
maxLines?numberMaximum visible editor lines before scrolling, between 1 and 100.
minLines?numberMinimum visible editor lines before scrolling, between 1 and 100.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier used to find the submitted rich-text value, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when editing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?JsonObjectRich-text content present when the editor first loads.
maxLines?numberMaximum visible editor lines before scrolling, between 1 and 100.
minLines?numberMinimum visible editor lines before scrolling, between 1 and 100.
placeholder?TextLikePlain-text prompt shown in the empty editor, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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 fieldTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOptions?JsonObject[]Options selected when the menu first loads.
maxSelectedItems?numberMaximum 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?TextLikePlain-text prompt shown before a selection, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOptions?JsonObject[]Options selected when the menu first loads.
maxSelectedItems?numberMaximum 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?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier returned when an option is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOption?JsonObjectOption 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?TextLikePlain-text prompt shown before a selection, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when an option is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialOption?JsonObjectOption 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?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier returned when a time is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown after a time is selected.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialTime?stringInitially selected time in 24-hour HH:mm format.
placeholder?TextLikePlain-text prompt shown before a time is selected, up to 150 characters.
timezone?stringIANA timezone displayed as supporting text and returned with interactions.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when a time is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown after a time is selected.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialTime?stringInitially selected time in 24-hour HH:mm format.
placeholder?TextLikePlain-text prompt shown before a time is selected, up to 150 characters.
timezone?stringIANA timezone displayed as supporting text and returned with interactions.

UrlElementInput

Fields accepted by urlInput.

Properties

PropertyTypeDescription
actionIdstringIdentifier used to find the submitted URL, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when typing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?stringURL present when the input first loads.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier used to find the submitted URL, up to 255 characters.
dispatchActionConfig?JsonObjectConfiguration controlling when typing dispatches a block_actions payload.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialValue?stringURL present when the input first loads.
placeholder?TextLikePlain-text prompt shown in the empty input, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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 fieldTypeDescription
textstringHuman-readable source label.
urlstringPublic source URL.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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 fieldTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialUsers?string[]User IDs selected when the menu first loads.
maxSelectedItems?numberMaximum number of users that may be selected; the minimum is one.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when the selection changes, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialUsers?string[]User IDs selected when the menu first loads.
maxSelectedItems?numberMaximum number of users that may be selected; the minimum is one.
placeholder?TextLikePlain-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 fieldTypeDescription
actionIdstringIdentifier returned when a user is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialUser?stringUser ID selected when the menu first loads.
placeholder?TextLikePlain-text prompt shown before a selection, up to 150 characters.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
actionIdstringIdentifier returned when a user is selected, up to 255 characters.
confirm?JsonObjectOptional confirmation dialog shown before the selection is submitted.
focusOnLoad?booleanWhether this element receives focus when its containing view opens.
initialUser?stringUser ID selected when the menu first loads.
placeholder?TextLikePlain-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 fieldTypeDescription
accessibilityLabel?stringAccessible label when the visible text is insufficient.
actionId?stringOptional interaction identifier.
confirm?JsonObjectOptional confirmation dialog.
style?"primary" | "danger"Optional visual emphasis.
textTextLikePlain-text label displayed on the button.
workflowJsonObjectWorkflow object created with workflow.

Settings

SettingTypeDescription
settingsFactorySettingsPer-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

PropertyTypeDescription
accessibilityLabel?stringAccessible label when the visible text is insufficient.
actionId?stringOptional interaction identifier.
confirm?JsonObjectOptional confirmation dialog.
style?"primary" | "danger"Optional visual emphasis.
textTextLikePlain-text label displayed on the button.
workflowJsonObjectWorkflow object created with workflow.