Elements
Fluent builders for interactive and visual elements placed inside Block Kit blocks. These controls collect input, trigger actions, display images, and let users choose from static, workspace, or application-provided data.
See: https://docs.slack.dev/reference/block-kit/block-elements.
Button()
function Button(): FluentBuilder<ButtonInput, SlackObject<"button">>;
Creates a fluent interactive button that can submit an action, open a URL, or
carry an application-defined value. Slack returns actionId and value in the
interaction payload when the user selects it.
See: https://docs.slack.dev/reference/block-kit/block-elements/button-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.text(value) | | Yes | Plain-text label displayed on the button. |
.actionId(value) | string | Yes | Identifier returned when the button is selected. |
.url(value) | string | No | Optional URL opened by the button. |
.value(value) | string | No | Optional application-defined value returned with the interaction. |
.style(value) | "primary" | "danger" | No | Optional visual emphasis. |
.confirm(value) | | No | Optional confirmation dialog created with Confirmation(). |
.accessibilityLabel(value) | string | No | Accessible label when the visible text is insufficient. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<ButtonInput, SlackObject<"button">>
ButtonInput
Configuration for an interactive button, including its label, action identifier, behavior, confirmation step, and accessibility text.
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()
function ChannelMultiSelect(): FluentBuilder<ChannelMultiSelectInput, SlackObject<"multi_channels_select">>;
Creates a multi-select populated with public channels visible to the current user. It can preselect channel IDs, limit the number selected, and show a confirmation dialog before submitting the change.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when the selection changes, up to 255 characters. |
.initialChannels(...values) | string[] | No | Public channel IDs selected when the menu first loads. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.maxSelectedItems(value) | number | No | Maximum number of channels that may be selected; the minimum is one. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<ChannelMultiSelectInput, SlackObject<"multi_channels_select">>
ChannelMultiSelectInput
Configuration for a public-channel multi-select, including initial channels, selection limit, confirmation step, and prompt.
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()
function ChannelSelect(): FluentBuilder<ChannelSelectInput, SlackObject<"channels_select">>;
Creates a single-select populated with public channels visible to the current user. It may start with one channel selected and can expose a response URL when used inside a modal.
See: https://docs.slack.dev/reference/block-kit/block-elements/select-menu-element#channels_select.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when a channel is selected, up to 255 characters. |
.initialChannel(value) | string | No | Public channel ID selected when the menu first loads. |
.responseUrlEnabled(value) | boolean | No | Include a response_url in a parent modal's submission payload. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<ChannelSelectInput, SlackObject<"channels_select">>
ChannelSelectInput
Configuration for a public-channel single-select, including its initial channel, modal response URL, confirmation step, and prompt.
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()
function Checkboxes(): FluentBuilder<CheckboxesInput, SlackObject<"checkboxes">>;
Creates a checkbox group that lets a user choose multiple items from a list of up to ten options. Initial selections must correspond to options included in the same element.
See: https://docs.slack.dev/reference/block-kit/block-elements/checkboxes-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when the checkbox selection changes, up to 255 characters. |
.options(...values) | | Yes | Up to ten option objects displayed as checkboxes. |
.initialOptions(...values) | | No | Options from options that are selected when the element first loads. |
.confirm(value) | | No | Optional confirmation dialog shown before the changed selection is submitted. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<CheckboxesInput, SlackObject<"checkboxes">>
CheckboxesInput
Configuration for a checkbox group, including its choices, initial selection, confirmation step, and focus behavior.
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()
function ConversationMultiSelect(): FluentBuilder<ConversationMultiSelectInput, SlackObject<"multi_conversations_select">>;
Creates a multi-select populated with conversations visible to the current user, including the conversation from which a view was opened when requested. Apply a conversation filter to control which channel and DM types appear.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when the selection changes, up to 255 characters. |
.initialConversations(...values) | string[] | No | Conversation IDs selected when the menu first loads. |
.defaultToCurrentConversation(value) | boolean | No | Select the conversation from which the view was opened by default. |
.filter(value) | | No | Filter controlling which public channels, private channels, DMs, and group DMs appear. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.maxSelectedItems(value) | number | No | Maximum number of conversations that may be selected; the minimum is one. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<ConversationMultiSelectInput, SlackObject<"multi_conversations_select">>
ConversationMultiSelectInput
Configuration for a conversation multi-select, including initial conversations, filtering, selection limits, and modal-aware defaults.
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()
function ConversationSelect(): FluentBuilder<ConversationSelectInput, SlackObject<"conversations_select">>;
Creates a single-select populated with visible public channels, private channels, direct messages, and group DMs. Apply a conversation filter to limit the available conversation types.
See: https://docs.slack.dev/reference/block-kit/block-elements/select-menu-element#conversations_select.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when a conversation is selected, up to 255 characters. |
.initialConversation(value) | string | No | Conversation ID selected when the menu first loads. |
.defaultToCurrentConversation(value) | boolean | No | Select the conversation from which the view was opened by default. |
.filter(value) | | No | Filter controlling which public channels, private channels, DMs, and group DMs appear. |
.responseUrlEnabled(value) | boolean | No | Include a response_url in a parent modal's submission payload. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<ConversationSelectInput, SlackObject<"conversations_select">>
ConversationSelectInput
Configuration for a conversation single-select, including filtering, modal-aware defaults, response URL behavior, and prompt.
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()
function DatePicker(): FluentBuilder<DatePickerInput, SlackObject<"datepicker">>;
Creates an interactive calendar control for selecting one date. The optional
initial value uses YYYY-MM-DD, and Slack returns the selected date with the
configured action identifier.
See: https://docs.slack.dev/reference/block-kit/block-elements/date-picker-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when a date is selected, up to 255 characters. |
.initialDate(value) | string | No | Initially selected date in YYYY-MM-DD format. |
.confirm(value) | | No | Optional confirmation dialog shown after a date is selected. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a date is selected, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<DatePickerInput, SlackObject<"datepicker">>
DatePickerInput
Configuration for a calendar date picker, including its action identifier, initial ISO date, prompt, and interaction behavior.
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()
function DateTimePicker(): FluentBuilder<DateTimePickerInput, SlackObject<"datetimepicker">>;
Creates an interactive control for selecting both a date and a time of day. Initial and submitted values are represented as Unix timestamps in seconds.
See: https://docs.slack.dev/reference/block-kit/block-elements/datetime-picker-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when a date and time are selected, up to 255 characters. |
.initialDateTime(value) | number | No | Initially selected date and time as a Unix timestamp in seconds. |
.confirm(value) | | No | Optional confirmation dialog shown after a date and time are selected. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<DateTimePickerInput, SlackObject<"datetimepicker">>
DateTimePickerInput
Configuration for a combined date-and-time picker whose initial and submitted values use Unix timestamps in seconds.
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
Configuration for an email-address input, including its initial value, empty-state prompt, focus, and dispatch behavior.
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()
function EmailInput(): FluentBuilder<EmailElementInput, SlackObject<"email_text_input">>;
Creates a single-line input specialized for email addresses. It can start with an existing value and optionally dispatch interaction payloads while the user edits the field.
See: https://docs.slack.dev/reference/block-kit/block-elements/email-input-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier used to find the submitted email value, up to 255 characters. |
.initialValue(value) | string | No | Email address present when the input first loads. |
.dispatchActionConfig(value) | | No | Configuration controlling when typing dispatches a block_actions payload. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown in the empty input, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<EmailElementInput, SlackObject<"email_text_input">>
ExternalMultiSelect()
function ExternalMultiSelect(): FluentBuilder<ExternalMultiSelectInput, SlackObject<"multi_external_select">>;
Creates a dynamic multi-select whose options are supplied by your application. Slack requests matching options after the user types the configured minimum number of characters.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when the selection changes, up to 255 characters. |
.minQueryLength(value) | number | No | Minimum typed characters before Slack requests options; defaults to three. |
.initialOptions(...values) | | No | Options selected when the menu first loads. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.maxSelectedItems(value) | number | No | Maximum number of options that may be selected; the minimum is one. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<ExternalMultiSelectInput, SlackObject<"multi_external_select">>
ExternalMultiSelectInput
Configuration for an externally populated multi-select, including query threshold, initial options, selection limit, and prompt.
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()
function ExternalSelect(): FluentBuilder<ExternalSelectInput, SlackObject<"external_select">>;
Creates a dynamic single-select whose options are supplied by your application. Slack requests matching options after the user types the configured minimum number of characters.
See: https://docs.slack.dev/reference/block-kit/block-elements/select-menu-element#external_select.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when an option is selected, up to 255 characters. |
.minQueryLength(value) | number | No | Minimum typed characters before Slack requests options; defaults to three. |
.initialOption(value) | | No | Option selected when the menu first loads. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<ExternalSelectInput, SlackObject<"external_select">>
ExternalSelectInput
Configuration for an externally populated single-select, including query threshold, initial option, confirmation step, and prompt.
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()
function FeedbackButton(): FluentBuilder<FeedbackButtonInput, JsonObject>;
Creates one labelled positive or negative choice for a FeedbackButtons control. The choice's value is returned to the application when the user gives feedback.
See: https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.text(value) | | Yes | Plain-text feedback choice. |
.value(value) | string | Yes | Application-defined value returned with the feedback. |
.accessibilityLabel(value) | string | No | Accessible label when the visible text is insufficient. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<FeedbackButtonInput, JsonObject>
FeedbackButtonInput
Configuration for one positive or negative feedback choice, including its visible text, returned value, and accessibility label.
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()
function FeedbackButtons(): FluentBuilder<{
actionId?: string;
negativeButton: JsonObject;
positiveButton: JsonObject;
}, SlackObject<"feedback_buttons">>;
Creates a paired positive and negative feedback control for a context-actions block. Build each choice with FeedbackButton so its visible text, returned value, and accessibility label are validated.
See: https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.positiveButton(value) | | Yes | Positive choice created with FeedbackButton(). |
.negativeButton(value) | | Yes | Negative choice created with FeedbackButton(). |
.actionId(value) | string | No | Optional identifier returned with the interaction. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<{
actionId?: string;
negativeButton: JsonObject;
positiveButton: JsonObject;
}, SlackObject<"feedback_buttons">>
FileInput()
function FileInput(): FluentBuilder<{
actionId: string;
filetypes?: string[];
maxFiles?: number;
}, SlackObject<"file_input">>;
Creates an interactive input that lets users upload files to Slack. Restrict
accepted formats with filetypes() and control the permitted number of files
with maxFiles().
See: https://docs.slack.dev/reference/block-kit/block-elements/file-input-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned with submitted files. |
.filetypes(...values) | string[] | No | Optional allowed file extensions. |
.maxFiles(value) | number | No | Maximum files accepted, between 1 and 10. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<{
actionId: string;
filetypes?: string[];
maxFiles?: number;
}, SlackObject<"file_input">>
IconButton()
function IconButton(): FluentBuilder<{
accessibilityLabel?: string;
actionId?: string;
confirm?: JsonObject;
icon?: "trash";
text: TextLike;
value?: string;
visibleToUserIds?: string[];
}, SlackObject<"icon_button">>;
Creates a compact icon-only action for a context-actions block. Slack currently
supports the trash icon, and the control can optionally be restricted to a
list of up to ten visible users.
See: https://docs.slack.dev/reference/block-kit/block-elements/icon-button-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.text(value) | | Yes | Plain-text description of the icon action. |
.icon(value) | "trash" | No | Icon name. Slack currently accepts only trash. |
.actionId(value) | string | No | Optional identifier returned with the interaction. |
.value(value) | string | No | Optional application-defined interaction value. |
.confirm(value) | | No | Optional confirmation dialog. |
.accessibilityLabel(value) | string | No | Accessible label when the text is insufficient. |
.visibleToUserIds(...values) | string[] | No | Up to ten user IDs allowed to see the action. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<{
accessibilityLabel?: string;
actionId?: string;
confirm?: JsonObject;
icon?: "trash";
text: TextLike;
value?: string;
visibleToUserIds?: string[];
}, SlackObject<"icon_button">>
ImageElement()
function ImageElement(): FluentBuilder<ImageElementBuilderInput, SlackObject<"image">>;
Creates an image element for use inside section and context blocks. Supply
accessible alternative text and exactly one public image URL or Slack-hosted
file reference; use ImageBlock() for a standalone image.
See: https://docs.slack.dev/reference/block-kit/block-elements/image-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.altText(value) | string | Yes | Alternative text for screen readers and unavailable images. |
.imageUrl(value) | string | No | Public URL of the image. Mutually exclusive with SlackFile(). |
.slackFile(value) | | No | Slack-hosted file object. Mutually exclusive with imageUrl. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<ImageElementBuilderInput, SlackObject<"image">>
ImageElementInput
type ImageElementInput =
| {
altText: string;
imageUrl: string;
slackFile?: never;
}
| {
altText: string;
imageUrl?: never;
slackFile: JsonObject;
};
Configuration for an image element. Accessible alternative text is always required, together with exactly one public image URL or Slack-hosted file.
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
Configuration for a numeric input, including decimal support, initial value, permitted range, prompt, and dispatch behavior.
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()
function NumberInput(): FluentBuilder<NumberElementInput, SlackObject<"number_input">>;
Creates an input that accepts whole numbers and, when enabled, decimal values
such as 0.25, 5.5, or -10. Optional minimum and maximum values constrain
what the user may submit.
See: https://docs.slack.dev/reference/block-kit/block-elements/number-input-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier used to find the submitted numeric value, up to 255 characters. |
.isDecimalAllowed(value) | boolean | No | Whether the input accepts decimal values as well as whole numbers. |
.initialValue(value) | string | No | Numeric text present when the input first loads. |
.minValue(value) | number | No | Minimum accepted value; it cannot exceed maxValue. |
.maxValue(value) | number | No | Maximum accepted value; it cannot be less than minValue. |
.dispatchActionConfig(value) | | No | Configuration controlling when typing dispatches a block_actions payload. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown in the empty input, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<NumberElementInput, SlackObject<"number_input">>
Overflow()
function Overflow(): FluentBuilder<OverflowInput, SlackObject<"overflow">>;
Creates a compact overflow menu, conventionally displayed as an ellipsis, for secondary actions. Slack requires between two and five options and returns the selected option with the action identifier.
See: https://docs.slack.dev/reference/block-kit/block-elements/overflow-menu-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when an option is selected, up to 255 characters. |
.options(...values) | | Yes | Between two and five option objects displayed in the compact menu. |
.confirm(value) | | No | Optional confirmation dialog shown after an option is selected. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<OverflowInput, SlackObject<"overflow">>
OverflowInput
Configuration for a compact overflow menu containing between two and five secondary action options.
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
Configuration for a free-form text field, including multiline display, initial text, character bounds, prompt, and dispatch behavior.
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()
function PlainTextInput(): FluentBuilder<PlainTextElementInput, SlackObject<"plain_text_input">>;
Creates a free-form plain-text field similar to an HTML <input> or textarea.
Configure single-line or multiline display, initial text, character limits,
and when editing should dispatch an interaction payload.
See: https://docs.slack.dev/reference/block-kit/block-elements/plain-text-input-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier used to find the submitted text value, up to 255 characters. |
.initialValue(value) | string | No | Text present when the input first loads. |
.multiline(value) | boolean | No | Whether the input is a multi-line textarea instead of a single line. |
.minLength(value) | number | No | Minimum number of characters the user must enter, between 0 and 3000. |
.maxLength(value) | number | No | Maximum number of characters the user may enter, between 1 and 3000. |
.dispatchActionConfig(value) | | No | Configuration controlling when typing dispatches a block_actions payload. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown in the empty input, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<PlainTextElementInput, SlackObject<"plain_text_input">>
RadioButtons()
function RadioButtons(): FluentBuilder<RadioButtonsInput, SlackObject<"radio_buttons">>;
Creates a radio-button group that lets a user choose exactly one item from up to ten options. An initial option may be selected before the element is shown.
See: https://docs.slack.dev/reference/block-kit/block-elements/radio-button-group-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when the selection changes, up to 255 characters. |
.options(...values) | | Yes | Up to ten options displayed as radio buttons. |
.initialOption(value) | | No | Option from options selected when the element first loads. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<RadioButtonsInput, SlackObject<"radio_buttons">>
RadioButtonsInput
Configuration for a single-choice radio-button group, including its options, initial choice, confirmation step, and focus behavior.
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
Configuration for a WYSIWYG rich-text editor, including initial content, prompt, dispatch behavior, and visible line bounds.
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()
function RichTextInput(): FluentBuilder<RichTextElementInput, SlackObject<"rich_text_input">>;
Creates a WYSIWYG rich-text editor similar to Slack's message composer. It can start with structured rich text, dispatch changes as the user edits, and limit the editor's visible height with minimum and maximum line counts.
See: https://docs.slack.dev/reference/block-kit/block-elements/rich-text-input-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier used to find the submitted rich-text value, up to 255 characters. |
.initialValue(value) | | No | Rich-text content present when the editor first loads. |
.dispatchActionConfig(value) | | No | Configuration controlling when editing dispatches a block_actions payload. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown in the empty editor, up to 150 characters. |
.minLines(value) | number | No | Minimum visible editor lines before scrolling, between 1 and 100. |
.maxLines(value) | number | No | Maximum visible editor lines before scrolling, between 1 and 100. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<RichTextElementInput, SlackObject<"rich_text_input">>
StaticMultiSelect()
function StaticMultiSelect(): FluentBuilder<StaticMultiSelectInput, SlackObject<"multi_static_select">>;
Creates a multi-select from options defined directly in the Block Kit payload. Supply either individual options or option groups, not both, and optionally mark matching options as initially selected.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when the selection changes, up to 255 characters. |
.options(...values) | | No | Up to 100 directly supplied options; mutually exclusive with optionGroups. |
.optionGroups(...values) | | No | Up to 100 groups of options; mutually exclusive with options. |
.initialOptions(...values) | | No | Options selected when the menu first loads. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.maxSelectedItems(value) | number | No | Maximum number of options that may be selected; the minimum is one. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<StaticMultiSelectInput, SlackObject<"multi_static_select">>
StaticMultiSelectInput
Configuration for a static multi-select. Supply either direct options or option groups, never both.
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()
function StaticSelect(): FluentBuilder<StaticSelectInput, SlackObject<"static_select">>;
Creates a single-select from options defined directly in the Block Kit payload. Supply either individual options or option groups, not both, and optionally set one matching initial option.
See: https://docs.slack.dev/reference/block-kit/block-elements/select-menu-element#static_select.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when an option is selected, up to 255 characters. |
.options(...values) | | No | Up to 100 directly supplied options; mutually exclusive with optionGroups. |
.optionGroups(...values) | | No | Up to 100 groups of options; mutually exclusive with options. |
.initialOption(value) | | No | Option selected when the menu first loads. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<StaticSelectInput, SlackObject<"static_select">>
StaticSelectInput
Configuration for a static single-select. Supply either direct options or option groups, never both.
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()
function TimePicker(): FluentBuilder<TimePickerInput, SlackObject<"timepicker">>;
Creates an interactive control for selecting a time of day. Initial values use
24-hour HH:mm format, and an optional IANA timezone is displayed as supporting
text and returned with interactions.
See: https://docs.slack.dev/reference/block-kit/block-elements/time-picker-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when a time is selected, up to 255 characters. |
.initialTime(value) | string | No | Initially selected time in 24-hour HH:mm format. |
.timezone(value) | string | No | IANA timezone displayed as supporting text and returned with interactions. |
.confirm(value) | | No | Optional confirmation dialog shown after a time is selected. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a time is selected, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<TimePickerInput, SlackObject<"timepicker">>
TimePickerInput
Configuration for a time-of-day picker, including its initial 24-hour time, timezone, confirmation step, and prompt.
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
Configuration for a URL input, including its initial value, empty-state prompt, focus, and dispatch behavior.
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()
function UrlInput(): FluentBuilder<UrlElementInput, SlackObject<"url_text_input">>;
Creates a single-line field specialized for collecting a URL. It can start with an existing value and optionally dispatch interaction payloads as the user edits the field.
See: https://docs.slack.dev/reference/block-kit/block-elements/url-input-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier used to find the submitted URL, up to 255 characters. |
.initialValue(value) | string | No | URL present when the input first loads. |
.dispatchActionConfig(value) | | No | Configuration controlling when typing dispatches a block_actions payload. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown in the empty input, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<UrlElementInput, SlackObject<"url_text_input">>
UrlSource()
function UrlSource(): FluentBuilder<{
text: string;
url: string;
}, SlackObject<"url">>;
Creates a labelled URL source for a task card. Use source links to identify the external documents, tickets, or other resources from which a task originated.
See: https://docs.slack.dev/reference/block-kit/blocks/task-card-block.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.url(value) | string | Yes | Public source URL. |
.text(value) | string | Yes | Human-readable source label. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<{
text: string;
url: string;
}, SlackObject<"url">>
UserMultiSelect()
function UserMultiSelect(): FluentBuilder<UserMultiSelectInput, SlackObject<"multi_users_select">>;
Creates a multi-select populated automatically with workspace users visible to the current user. It can preselect user IDs and enforce a maximum number of selections.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
Collection setters accept individual values, nested builders, or arrays and append each call.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when the selection changes, up to 255 characters. |
.initialUsers(...values) | string[] | No | User IDs selected when the menu first loads. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.maxSelectedItems(value) | number | No | Maximum number of users that may be selected; the minimum is one. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<UserMultiSelectInput, SlackObject<"multi_users_select">>
UserMultiSelectInput
Configuration for a workspace-user multi-select, including initial users, selection limit, confirmation step, and prompt.
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()
function UserSelect(): FluentBuilder<UserSelectInput, SlackObject<"users_select">>;
Creates a single-select populated automatically with workspace users visible to the current user. It can begin with one user ID already selected.
See: https://docs.slack.dev/reference/block-kit/block-elements/select-menu-element#users_select.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.actionId(value) | string | Yes | Identifier returned when a user is selected, up to 255 characters. |
.initialUser(value) | string | No | User ID selected when the menu first loads. |
.confirm(value) | | No | Optional confirmation dialog shown before the selection is submitted. |
.focusOnLoad(value) | boolean | No | Whether this element receives focus when its containing view opens. |
.placeholder(value) | | No | Plain-text prompt shown before a selection, up to 150 characters. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<UserSelectInput, SlackObject<"users_select">>
UserSelectInput
Configuration for a workspace-user single-select, including its initial user, confirmation step, focus behavior, and prompt.
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()
function WorkflowButton(): FluentBuilder<WorkflowButtonInput, SlackObject<"workflow_button">>;
Creates a button that launches a Slack link trigger with optional customizable inputs. Build the nested workflow, trigger, and input parameters with the corresponding composition-object builders.
See: https://docs.slack.dev/reference/block-kit/block-elements/workflow-button-element.
Chainable setters
Call these setters in any order before .build(). Repeating a singular setter replaces its previous value.
| Setter | Value type | Required | Description |
|---|---|---|---|
.text(value) | | Yes | Plain-text label displayed on the button. |
.workflow(value) | | Yes | Workflow object created with Workflow(). |
.actionId(value) | string | No | Optional interaction identifier. |
.confirm(value) | | No | Optional confirmation dialog. |
.style(value) | "primary" | "danger" | No | Optional visual emphasis. |
.accessibilityLabel(value) | string | No | Accessible label when the visible text is insufficient. |
Validation and errors
.build() materializes nested builders and validates the finished Slack object. It throws a typed slackblocks validation error when a required value is missing, a value has the wrong type or range, mutually exclusive setters are combined, or Slack rejects the resulting shape. Pass { validate: false } to .build() only when intentionally creating an intermediate partial object.
Returns
FluentBuilder<WorkflowButtonInput, SlackObject<"workflow_button">>
WorkflowButtonInput
Configuration for a workflow button that launches a Slack link trigger with optional interaction and accessibility settings.
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. |