Skip to main content

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.

SetterValue typeRequiredDescription
.text(value)
TextLike
YesPlain-text label displayed on the button.
.actionId(value)stringYesIdentifier returned when the button is selected.
.url(value)stringNoOptional URL opened by the button.
.value(value)stringNoOptional application-defined value returned with the interaction.
.style(value)"primary" | "danger"NoOptional visual emphasis.
.confirm(value)
JsonObject
NoOptional confirmation dialog created with Confirmation().
.accessibilityLabel(value)stringNoAccessible 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

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()

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.

See: https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#channel_multi_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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when the selection changes, up to 255 characters.
.initialChannels(...values)string[]NoPublic channel IDs selected when the menu first loads.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.maxSelectedItems(value)numberNoMaximum number of channels that may be selected; the minimum is one.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when a channel is selected, up to 255 characters.
.initialChannel(value)stringNoPublic channel ID selected when the menu first loads.
.responseUrlEnabled(value)booleanNoInclude a response_url in a parent modal's submission payload.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when the checkbox selection changes, up to 255 characters.
.options(...values)
JsonObject[]
YesUp to ten option objects displayed as checkboxes.
.initialOptions(...values)
JsonObject[]
NoOptions from options that are selected when the element first loads.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the changed selection is submitted.
.focusOnLoad(value)booleanNoWhether 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

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()

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.

See: https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#conversation_multi_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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when the selection changes, up to 255 characters.
.initialConversations(...values)string[]NoConversation IDs selected when the menu first loads.
.defaultToCurrentConversation(value)booleanNoSelect the conversation from which the view was opened by default.
.filter(value)
JsonObject
NoFilter controlling which public channels, private channels, DMs, and group DMs appear.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.maxSelectedItems(value)numberNoMaximum number of conversations that may be selected; the minimum is one.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when a conversation is selected, up to 255 characters.
.initialConversation(value)stringNoConversation ID selected when the menu first loads.
.defaultToCurrentConversation(value)booleanNoSelect the conversation from which the view was opened by default.
.filter(value)
JsonObject
NoFilter controlling which public channels, private channels, DMs, and group DMs appear.
.responseUrlEnabled(value)booleanNoInclude a response_url in a parent modal's submission payload.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when a date is selected, up to 255 characters.
.initialDate(value)stringNoInitially selected date in YYYY-MM-DD format.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown after a date is selected.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when a date and time are selected, up to 255 characters.
.initialDateTime(value)numberNoInitially selected date and time as a Unix timestamp in seconds.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown after a date and time are selected.
.focusOnLoad(value)booleanNoWhether 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

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

Configuration for an email-address input, including its initial value, empty-state prompt, focus, and dispatch behavior.

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier used to find the submitted email value, up to 255 characters.
.initialValue(value)stringNoEmail address present when the input first loads.
.dispatchActionConfig(value)
JsonObject
NoConfiguration controlling when typing dispatches a block_actions payload.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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.

See: https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#external_multi_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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when the selection changes, up to 255 characters.
.minQueryLength(value)numberNoMinimum typed characters before Slack requests options; defaults to three.
.initialOptions(...values)
JsonObject[]
NoOptions selected when the menu first loads.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.maxSelectedItems(value)numberNoMaximum number of options that may be selected; the minimum is one.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when an option is selected, up to 255 characters.
.minQueryLength(value)numberNoMinimum typed characters before Slack requests options; defaults to three.
.initialOption(value)
JsonObject
NoOption selected when the menu first loads.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.text(value)
TextLike
YesPlain-text feedback choice.
.value(value)stringYesApplication-defined value returned with the feedback.
.accessibilityLabel(value)stringNoAccessible 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

PropertyTypeDescription
accessibilityLabel?stringAccessible label when the visible text is insufficient.
textTextLikePlain-text feedback choice.
valuestringApplication-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.

SetterValue typeRequiredDescription
.positiveButton(value)
JsonObject
YesPositive choice created with FeedbackButton().
.negativeButton(value)
JsonObject
YesNegative choice created with FeedbackButton().
.actionId(value)stringNoOptional 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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned with submitted files.
.filetypes(...values)string[]NoOptional allowed file extensions.
.maxFiles(value)numberNoMaximum 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.

SetterValue typeRequiredDescription
.text(value)
TextLike
YesPlain-text description of the icon action.
.icon(value)"trash"NoIcon name. Slack currently accepts only trash.
.actionId(value)stringNoOptional identifier returned with the interaction.
.value(value)stringNoOptional application-defined interaction value.
.confirm(value)
JsonObject
NoOptional confirmation dialog.
.accessibilityLabel(value)stringNoAccessible label when the text is insufficient.
.visibleToUserIds(...values)string[]NoUp 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.

SetterValue typeRequiredDescription
.altText(value)stringYesAlternative text for screen readers and unavailable images.
.imageUrl(value)stringNoPublic URL of the image. Mutually exclusive with SlackFile().
.slackFile(value)
JsonObject
NoSlack-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;
}
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

Configuration for a numeric input, including decimal support, initial value, permitted range, prompt, and dispatch behavior.

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier used to find the submitted numeric value, up to 255 characters.
.isDecimalAllowed(value)booleanNoWhether the input accepts decimal values as well as whole numbers.
.initialValue(value)stringNoNumeric text present when the input first loads.
.minValue(value)numberNoMinimum accepted value; it cannot exceed maxValue.
.maxValue(value)numberNoMaximum accepted value; it cannot be less than minValue.
.dispatchActionConfig(value)
JsonObject
NoConfiguration controlling when typing dispatches a block_actions payload.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when an option is selected, up to 255 characters.
.options(...values)
JsonObject[]
YesBetween two and five option objects displayed in the compact menu.
.confirm(value)
JsonObject
NoOptional 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

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

Configuration for a free-form text field, including multiline display, initial text, character bounds, prompt, and dispatch behavior.

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier used to find the submitted text value, up to 255 characters.
.initialValue(value)stringNoText present when the input first loads.
.multiline(value)booleanNoWhether the input is a multi-line textarea instead of a single line.
.minLength(value)numberNoMinimum number of characters the user must enter, between 0 and 3000.
.maxLength(value)numberNoMaximum number of characters the user may enter, between 1 and 3000.
.dispatchActionConfig(value)
JsonObject
NoConfiguration controlling when typing dispatches a block_actions payload.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when the selection changes, up to 255 characters.
.options(...values)
JsonObject[]
YesUp to ten options displayed as radio buttons.
.initialOption(value)
JsonObject
NoOption from options selected when the element first loads.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.focusOnLoad(value)booleanNoWhether 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

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

Configuration for a WYSIWYG rich-text editor, including initial content, prompt, dispatch behavior, and visible line bounds.

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier used to find the submitted rich-text value, up to 255 characters.
.initialValue(value)
JsonObject
NoRich-text content present when the editor first loads.
.dispatchActionConfig(value)
JsonObject
NoConfiguration controlling when editing dispatches a block_actions payload.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-text prompt shown in the empty editor, up to 150 characters.
.minLines(value)numberNoMinimum visible editor lines before scrolling, between 1 and 100.
.maxLines(value)numberNoMaximum 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.

See: https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#static_multi_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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when the selection changes, up to 255 characters.
.options(...values)
JsonObject[]
NoUp to 100 directly supplied options; mutually exclusive with optionGroups.
.optionGroups(...values)
JsonObject[]
NoUp to 100 groups of options; mutually exclusive with options.
.initialOptions(...values)
JsonObject[]
NoOptions selected when the menu first loads.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.maxSelectedItems(value)numberNoMaximum number of options that may be selected; the minimum is one.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when an option is selected, up to 255 characters.
.options(...values)
JsonObject[]
NoUp to 100 directly supplied options; mutually exclusive with optionGroups.
.optionGroups(...values)
JsonObject[]
NoUp to 100 groups of options; mutually exclusive with options.
.initialOption(value)
JsonObject
NoOption selected when the menu first loads.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when a time is selected, up to 255 characters.
.initialTime(value)stringNoInitially selected time in 24-hour HH:mm format.
.timezone(value)stringNoIANA timezone displayed as supporting text and returned with interactions.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown after a time is selected.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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

Configuration for a URL input, including its initial value, empty-state prompt, focus, and dispatch behavior.

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier used to find the submitted URL, up to 255 characters.
.initialValue(value)stringNoURL present when the input first loads.
.dispatchActionConfig(value)
JsonObject
NoConfiguration controlling when typing dispatches a block_actions payload.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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.

SetterValue typeRequiredDescription
.url(value)stringYesPublic source URL.
.text(value)stringYesHuman-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.

See: https://docs.slack.dev/reference/block-kit/block-elements/multi-select-menu-element#user_multi_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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when the selection changes, up to 255 characters.
.initialUsers(...values)string[]NoUser IDs selected when the menu first loads.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.maxSelectedItems(value)numberNoMaximum number of users that may be selected; the minimum is one.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.actionId(value)stringYesIdentifier returned when a user is selected, up to 255 characters.
.initialUser(value)stringNoUser ID selected when the menu first loads.
.confirm(value)
JsonObject
NoOptional confirmation dialog shown before the selection is submitted.
.focusOnLoad(value)booleanNoWhether this element receives focus when its containing view opens.
.placeholder(value)
TextLike
NoPlain-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

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()

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.

SetterValue typeRequiredDescription
.text(value)
TextLike
YesPlain-text label displayed on the button.
.workflow(value)
JsonObject
YesWorkflow object created with Workflow().
.actionId(value)stringNoOptional interaction identifier.
.confirm(value)
JsonObject
NoOptional confirmation dialog.
.style(value)"primary" | "danger"NoOptional visual emphasis.
.accessibilityLabel(value)stringNoAccessible 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

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.