Skip to main content

Elements

Generated from actual PHP reflection and PHPDoc. Names live in the Slackblocks namespace. Use named arguments and declare(strict_types=1); values validate before construction returns.

ButtonElement​

An interactive button that sends a payload or opens a URL. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$text​

Sets the button label.

public readonly PlainText $text;

Related types: PlainText

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$url​

Sets a URL opened in the user's browser when the button is clicked. Slack still sends an interaction payload.

public readonly ?string $url;

$value​

Sets the application-defined value sent in interaction payloads.

public readonly ?string $value;

$style​

Sets the button's emphasis. Omit it for the default neutral style.

public readonly ?ButtonStyle $style;

Related types: ButtonStyle

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$accessibilityLabel​

Sets the label read by screen readers in place of the visible text.

public readonly ?string $accessibilityLabel;

__construct​

Construct a validated immutable value.

public function __construct(PlainText|string $text, ?string $actionId = NULL, ?string $url = NULL, ?string $value = NULL, ?ButtonStyle $style = NULL, ?Confirmation $confirm = NULL, ?string $accessibilityLabel = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
textPlainText|string — Sets the button label.
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
urlstring|null — Sets a URL opened in the user's browser when the button is clicked. Slack still sends an interaction payload.
valuestring|null — Sets the application-defined value sent in interaction payloads.
styleButtonStyle|null — Sets the button's emphasis. Omit it for the default neutral style.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
accessibilityLabelstring|null — Sets the label read by screen readers in place of the visible text.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: ButtonStyle, Confirmation, JsonObject, PlainText

ChannelMultiSelectElement​

A menu for selecting multiple public channels. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialChannels​

Adds channel IDs that are selected when the menu loads.

/** @var list<string>|null */
public readonly ?array $initialChannels;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$maxSelectedItems​

Sets the maximum number of items a user can select.

public readonly ?int $maxSelectedItems;

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?array $initialChannels = NULL, ?Confirmation $confirm = NULL, ?int $maxSelectedItems = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialChannelslist<string>|null — Adds channel IDs that are selected when the menu loads.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
maxSelectedItemsint|null — Sets the maximum number of items a user can select.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, PlainText

ChannelSelectElement​

A menu for selecting one public channel. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialChannel​

Sets the channel ID selected when the menu loads.

public readonly ?string $initialChannel;

$responseUrlEnabled​

Sets whether the selected conversation receives a response URL in the view submission payload. Only valid in modals.

public readonly ?bool $responseUrlEnabled;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?string $initialChannel = NULL, ?bool $responseUrlEnabled = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialChannelstring|null — Sets the channel ID selected when the menu loads.
responseUrlEnabledbool|null — Sets whether the selected conversation receives a response URL in the view submission payload. Only valid in modals.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, PlainText

CheckboxesElement​

A group of checkboxes. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$options​

Adds selectable options in display order.

/** @var list<Option> */
public readonly array $options;

Related types: Option

$initialOptions​

Adds options that are selected when the element loads. Each must match an option in the element.

/** @var list<Option>|null */
public readonly ?array $initialOptions;

Related types: Option

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

__construct​

Construct a validated immutable value.

public function __construct(array $options, ?string $actionId = NULL, ?array $initialOptions = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
optionslist<Option> — Adds selectable options in display order.
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialOptionslist<Option>|null — Adds options that are selected when the element loads. Each must match an option in the element.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject

ConversationMultiSelectElement​

A menu for selecting multiple conversations. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialConversations​

Adds conversation IDs that are selected when the menu loads.

/** @var list<string>|null */
public readonly ?array $initialConversations;

$defaultToCurrentConversation​

Sets whether the menu pre-selects the conversation the user is viewing.

public readonly ?bool $defaultToCurrentConversation;

$filter​

Sets which conversation types the menu offers.

public readonly ?ConversationFilter $filter;

Related types: ConversationFilter

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$maxSelectedItems​

Sets the maximum number of items a user can select.

public readonly ?int $maxSelectedItems;

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?array $initialConversations = NULL, ?bool $defaultToCurrentConversation = NULL, ?ConversationFilter $filter = NULL, ?Confirmation $confirm = NULL, ?int $maxSelectedItems = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialConversationslist<string>|null — Adds conversation IDs that are selected when the menu loads.
defaultToCurrentConversationbool|null — Sets whether the menu pre-selects the conversation the user is viewing.
filterConversationFilter|null — Sets which conversation types the menu offers.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
maxSelectedItemsint|null — Sets the maximum number of items a user can select.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, ConversationFilter, JsonObject, PlainText

ConversationSelectElement​

A menu for selecting one conversation. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialConversation​

Sets the conversation ID selected when the menu loads.

public readonly ?string $initialConversation;

$defaultToCurrentConversation​

Sets whether the menu pre-selects the conversation the user is viewing.

public readonly ?bool $defaultToCurrentConversation;

$filter​

Sets which conversation types the menu offers.

public readonly ?ConversationFilter $filter;

Related types: ConversationFilter

$responseUrlEnabled​

Sets whether the selected conversation receives a response URL in the view submission payload. Only valid in modals.

public readonly ?bool $responseUrlEnabled;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?string $initialConversation = NULL, ?bool $defaultToCurrentConversation = NULL, ?ConversationFilter $filter = NULL, ?bool $responseUrlEnabled = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialConversationstring|null — Sets the conversation ID selected when the menu loads.
defaultToCurrentConversationbool|null — Sets whether the menu pre-selects the conversation the user is viewing.
filterConversationFilter|null — Sets which conversation types the menu offers.
responseUrlEnabledbool|null — Sets whether the selected conversation receives a response URL in the view submission payload. Only valid in modals.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, ConversationFilter, JsonObject, PlainText

DatePickerElement​

A calendar date picker. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialDate​

Sets the initially selected date, formatted as YYYY-MM-DD.

public readonly ?string $initialDate;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?string $initialDate = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialDatestring|null — Sets the initially selected date, formatted as YYYY-MM-DD.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, PlainText

DateTimePickerElement​

A combined date and time picker. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialDateTime​

Sets the initially selected moment as a UNIX timestamp in seconds.

public readonly ?int $initialDateTime;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?int $initialDateTime = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialDateTimeint|null — Sets the initially selected moment as a UNIX timestamp in seconds.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject

EmailInputElement​

A single-line input that accepts an email address. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialValue​

Sets the value present when the input loads.

public readonly ?string $initialValue;

$dispatchActionConfig​

Sets which user interactions send a block_actions payload.

public readonly ?DispatchActionConfiguration $dispatchActionConfig;

Related types: DispatchActionConfiguration

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?string $initialValue = NULL, ?DispatchActionConfiguration $dispatchActionConfig = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialValuestring|null — Sets the value present when the input loads.
dispatchActionConfigDispatchActionConfiguration|null — Sets which user interactions send a block_actions payload.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: DispatchActionConfiguration, JsonObject, PlainText

ExternalMultiSelectElement​

A menu for selecting multiple options loaded from your app. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$minQueryLength​

Sets how many characters the user must type before Slack queries your options endpoint.

public readonly ?int $minQueryLength;

$initialOptions​

Adds options that are selected when the element loads. Each must match an option in the element.

/** @var list<Option>|null */
public readonly ?array $initialOptions;

Related types: Option

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$maxSelectedItems​

Sets the maximum number of items a user can select.

public readonly ?int $maxSelectedItems;

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?int $minQueryLength = NULL, ?array $initialOptions = NULL, ?Confirmation $confirm = NULL, ?int $maxSelectedItems = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
minQueryLengthint|null — Sets how many characters the user must type before Slack queries your options endpoint.
initialOptionslist<Option>|null — Adds options that are selected when the element loads. Each must match an option in the element.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
maxSelectedItemsint|null — Sets the maximum number of items a user can select.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, PlainText

ExternalSelectElement​

A menu for selecting one option loaded from your app. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$minQueryLength​

Sets how many characters the user must type before Slack queries your options endpoint.

public readonly ?int $minQueryLength;

$initialOption​

Sets the option selected when the element loads. It must match an option in the element.

public readonly ?Option $initialOption;

Related types: Option

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?int $minQueryLength = NULL, ?Option $initialOption = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
minQueryLengthint|null — Sets how many characters the user must type before Slack queries your options endpoint.
initialOptionOption|null — Sets the option selected when the element loads. It must match an option in the element.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, Option, PlainText

FeedbackButtonsElement​

A pair of thumbs-up and thumbs-down feedback buttons. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$positiveButton​

Sets the button for positive feedback.

public readonly FeedbackButton $positiveButton;

Related types: FeedbackButton

$negativeButton​

Sets the button for negative feedback.

public readonly FeedbackButton $negativeButton;

Related types: FeedbackButton

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

__construct​

Construct a validated immutable value.

public function __construct(FeedbackButton $positiveButton, FeedbackButton $negativeButton, ?string $actionId = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
positiveButtonFeedbackButton — Sets the button for positive feedback.
negativeButtonFeedbackButton — Sets the button for negative feedback.
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: FeedbackButton, JsonObject

FileInputElement​

An input that lets users upload files. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$filetypes​

Adds accepted file extensions, such as pdf or png.

/** @var list<string>|null */
public readonly ?array $filetypes;

$maxFiles​

Sets the maximum number of files a user can upload.

public readonly ?int $maxFiles;

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?array $filetypes = NULL, ?int $maxFiles = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
filetypeslist<string>|null — Adds accepted file extensions, such as pdf or png.
maxFilesint|null — Sets the maximum number of files a user can upload.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

IconButtonElement​

A button that shows an icon instead of text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$text​

Sets the text used as the button's accessible name.

public readonly PlainText $text;

Related types: PlainText

$icon​

Sets the icon shown on the button.

public readonly IconButtonIcon $icon;

Related types: IconButtonIcon

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$value​

Sets the application-defined value sent in interaction payloads.

public readonly ?string $value;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$accessibilityLabel​

Sets the label read by screen readers in place of the visible text.

public readonly ?string $accessibilityLabel;

$visibleToUserIds​

Adds the IDs of users who can see this button.

/** @var list<string>|null */
public readonly ?array $visibleToUserIds;

__construct​

Construct a validated immutable value.

public function __construct(PlainText|string $text, IconButtonIcon $icon = IconButtonIcon::Trash, ?string $actionId = NULL, ?string $value = NULL, ?Confirmation $confirm = NULL, ?string $accessibilityLabel = NULL, ?array $visibleToUserIds = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
textPlainText|string — Sets the text used as the button's accessible name.
iconIconButtonIcon — Sets the icon shown on the button.
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
valuestring|null — Sets the application-defined value sent in interaction payloads.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
accessibilityLabelstring|null — Sets the label read by screen readers in place of the visible text.
visibleToUserIdslist<string>|null — Adds the IDs of users who can see this button.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, IconButtonIcon, JsonObject, PlainText

ImageElement​

An image displayed inside a section, context, or card. Provide exactly one of an image URL or a Slack file. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$altText​

Sets a plain-text summary of the image or video for assistive technology.

public readonly string $altText;

$imageUrl​

Sets the publicly accessible URL of the image. Cannot be combined with a Slack file.

public readonly ?string $imageUrl;

$slackFile​

Sets a file hosted in Slack as the image source. Cannot be combined with an image URL.

public readonly ?SlackFile $slackFile;

Related types: SlackFile

__construct​

Construct a validated immutable value.

public function __construct(string $altText, ?string $imageUrl = NULL, ?SlackFile $slackFile = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
altTextstring — Sets a plain-text summary of the image or video for assistive technology.
imageUrlstring|null — Sets the publicly accessible URL of the image. Cannot be combined with a Slack file.
slackFileSlackFile|null — Sets a file hosted in Slack as the image source. Cannot be combined with an image URL.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, SlackFile

NumberInputElement​

An input that accepts whole or decimal numbers. The minimum value cannot exceed the maximum value. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$isDecimalAllowed​

Sets whether the input accepts decimal numbers.

public readonly bool $isDecimalAllowed;

$initialValue​

Sets the number present when the input loads, as a string such as 42 or 3.5.

public readonly ?string $initialValue;

$minValue​

Sets the smallest accepted number.

public readonly int|float|null $minValue;

$maxValue​

Sets the largest accepted number.

public readonly int|float|null $maxValue;

$dispatchActionConfig​

Sets which user interactions send a block_actions payload.

public readonly ?DispatchActionConfiguration $dispatchActionConfig;

Related types: DispatchActionConfiguration

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(bool $isDecimalAllowed, ?string $actionId = NULL, ?string $initialValue = NULL, int|float|null $minValue = NULL, int|float|null $maxValue = NULL, ?DispatchActionConfiguration $dispatchActionConfig = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
isDecimalAllowedbool — Sets whether the input accepts decimal numbers.
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialValuestring|null — Sets the number present when the input loads, as a string such as 42 or 3.5.
minValueint|float|null — Sets the smallest accepted number.
maxValueint|float|null — Sets the largest accepted number.
dispatchActionConfigDispatchActionConfiguration|null — Sets which user interactions send a block_actions payload.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: DispatchActionConfiguration, JsonObject, PlainText

OverflowElement​

A compact menu of up to five options. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$options​

Adds selectable options in display order.

/** @var list<Option> */
public readonly array $options;

Related types: Option

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

__construct​

Construct a validated immutable value.

public function __construct(array $options, ?string $actionId = NULL, ?Confirmation $confirm = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
optionslist<Option> — Adds selectable options in display order.
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject

PlainTextInputElement​

A single-line or multi-line free-text input. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialValue​

Sets the value present when the input loads.

public readonly ?string $initialValue;

$multiline​

Sets whether the input is a multi-line text area.

public readonly ?bool $multiline;

$minLength​

Sets the minimum number of characters the user must enter.

public readonly ?int $minLength;

$maxLength​

Sets the maximum number of characters the user can enter.

public readonly ?int $maxLength;

$dispatchActionConfig​

Sets which user interactions send a block_actions payload.

public readonly ?DispatchActionConfiguration $dispatchActionConfig;

Related types: DispatchActionConfiguration

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?string $initialValue = NULL, ?bool $multiline = NULL, ?int $minLength = NULL, ?int $maxLength = NULL, ?DispatchActionConfiguration $dispatchActionConfig = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialValuestring|null — Sets the value present when the input loads.
multilinebool|null — Sets whether the input is a multi-line text area.
minLengthint|null — Sets the minimum number of characters the user must enter.
maxLengthint|null — Sets the maximum number of characters the user can enter.
dispatchActionConfigDispatchActionConfiguration|null — Sets which user interactions send a block_actions payload.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: DispatchActionConfiguration, JsonObject, PlainText

RadioButtonsElement​

A group of radio buttons. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$options​

Adds selectable options in display order.

/** @var list<Option> */
public readonly array $options;

Related types: Option

$initialOption​

Sets the option selected when the element loads. It must match an option in the element.

public readonly ?Option $initialOption;

Related types: Option

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

__construct​

Construct a validated immutable value.

public function __construct(array $options, ?string $actionId = NULL, ?Option $initialOption = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
optionslist<Option> — Adds selectable options in display order.
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialOptionOption|null — Sets the option selected when the element loads. It must match an option in the element.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, Option

RichTextInputElement​

An input that accepts formatted rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly string $actionId;

$initialValue​

Sets the rich text present when the input loads.

public readonly ?RichTextBlock $initialValue;

Related types: RichTextBlock

$dispatchActionConfig​

Sets which user interactions send a block_actions payload.

public readonly ?DispatchActionConfiguration $dispatchActionConfig;

Related types: DispatchActionConfiguration

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

$minLines​

Sets the minimum visible height of the input, in lines.

public readonly ?int $minLines;

$maxLines​

Sets the maximum visible height of the input, in lines.

public readonly ?int $maxLines;

__construct​

Construct a validated immutable value.

public function __construct(string $actionId, ?RichTextBlock $initialValue = NULL, ?DispatchActionConfiguration $dispatchActionConfig = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?int $minLines = NULL, ?int $maxLines = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialValueRichTextBlock|null — Sets the rich text present when the input loads.
dispatchActionConfigDispatchActionConfiguration|null — Sets which user interactions send a block_actions payload.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
minLinesint|null — Sets the minimum visible height of the input, in lines.
maxLinesint|null — Sets the maximum visible height of the input, in lines.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: DispatchActionConfiguration, JsonObject, PlainText, RichTextBlock

StaticMultiSelectElement​

A menu for selecting multiple options defined in the payload. Use options or option groups, not both. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$options​

Adds selectable options in display order.

/** @var list<Option>|null */
public readonly ?array $options;

Related types: Option

$optionGroups​

Adds labelled groups of options in display order. Cannot be combined with ungrouped options.

/** @var list<OptionGroup>|null */
public readonly ?array $optionGroups;

Related types: OptionGroup

$initialOptions​

Adds options that are selected when the element loads. Each must match an option in the element.

/** @var list<Option>|null */
public readonly ?array $initialOptions;

Related types: Option

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$maxSelectedItems​

Sets the maximum number of items a user can select.

public readonly ?int $maxSelectedItems;

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?array $options = NULL, ?array $optionGroups = NULL, ?array $initialOptions = NULL, ?Confirmation $confirm = NULL, ?int $maxSelectedItems = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
optionslist<Option>|null — Adds selectable options in display order.
optionGroupslist<OptionGroup>|null — Adds labelled groups of options in display order. Cannot be combined with ungrouped options.
initialOptionslist<Option>|null — Adds options that are selected when the element loads. Each must match an option in the element.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
maxSelectedItemsint|null — Sets the maximum number of items a user can select.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, PlainText

StaticSelectElement​

A menu for selecting one option defined in the payload. Use options or option groups, not both. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$options​

Adds selectable options in display order.

/** @var list<Option>|null */
public readonly ?array $options;

Related types: Option

$optionGroups​

Adds labelled groups of options in display order. Cannot be combined with ungrouped options.

/** @var list<OptionGroup>|null */
public readonly ?array $optionGroups;

Related types: OptionGroup

$initialOption​

Sets the option selected when the element loads. It must match an option in the element.

public readonly ?Option $initialOption;

Related types: Option

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?array $options = NULL, ?array $optionGroups = NULL, ?Option $initialOption = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
optionslist<Option>|null — Adds selectable options in display order.
optionGroupslist<OptionGroup>|null — Adds labelled groups of options in display order. Cannot be combined with ungrouped options.
initialOptionOption|null — Sets the option selected when the element loads. It must match an option in the element.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, Option, PlainText

TimePickerElement​

A time-of-day picker. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialTime​

Sets the initially selected time, formatted as HH:mm in 24-hour time.

public readonly ?string $initialTime;

$timezone​

Sets the IANA time zone used to display the time, such as Australia/Brisbane.

public readonly ?string $timezone;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?string $initialTime = NULL, ?string $timezone = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialTimestring|null — Sets the initially selected time, formatted as HH:mm in 24-hour time.
timezonestring|null — Sets the IANA time zone used to display the time, such as Australia/Brisbane.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, PlainText

UrlInputElement​

A single-line input that accepts a URL. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialValue​

Sets the value present when the input loads.

public readonly ?string $initialValue;

$dispatchActionConfig​

Sets which user interactions send a block_actions payload.

public readonly ?DispatchActionConfiguration $dispatchActionConfig;

Related types: DispatchActionConfiguration

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?string $initialValue = NULL, ?DispatchActionConfiguration $dispatchActionConfig = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialValuestring|null — Sets the value present when the input loads.
dispatchActionConfigDispatchActionConfiguration|null — Sets which user interactions send a block_actions payload.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: DispatchActionConfiguration, JsonObject, PlainText

UserMultiSelectElement​

A menu for selecting multiple workspace users. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialUsers​

Adds user IDs that are selected when the menu loads.

/** @var list<string>|null */
public readonly ?array $initialUsers;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$maxSelectedItems​

Sets the maximum number of items a user can select.

public readonly ?int $maxSelectedItems;

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?array $initialUsers = NULL, ?Confirmation $confirm = NULL, ?int $maxSelectedItems = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialUserslist<string>|null — Adds user IDs that are selected when the menu loads.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
maxSelectedItemsint|null — Sets the maximum number of items a user can select.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, PlainText

UserSelectElement​

A menu for selecting one workspace user. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly ?string $actionId;

$initialUser​

Sets the user ID selected when the menu loads.

public readonly ?string $initialUser;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$focusOnLoad​

Sets whether the element receives focus when the view opens. Only one element per view may do so.

public readonly ?bool $focusOnLoad;

$placeholder​

Sets the placeholder text shown before a value is chosen.

public readonly ?PlainText $placeholder;

Related types: PlainText

__construct​

Construct a validated immutable value.

public function __construct(?string $actionId = NULL, ?string $initialUser = NULL, ?Confirmation $confirm = NULL, ?bool $focusOnLoad = NULL, PlainText|string|null $placeholder = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
actionIdstring|null — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initialUserstring|null — Sets the user ID selected when the menu loads.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
focusOnLoadbool|null — Sets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderPlainText|string|null — Sets the placeholder text shown before a value is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: Confirmation, JsonObject, PlainText

WorkflowButtonElement​

A button that starts a workflow through a link trigger. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$text​

Sets the button label.

public readonly PlainText $text;

Related types: PlainText

$workflow​

Sets the workflow started when the button is clicked.

public readonly Workflow $workflow;

Related types: Workflow

$actionId​

Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.

public readonly string $actionId;

$confirm​

Sets a confirmation dialog shown before the action is sent.

public readonly ?Confirmation $confirm;

Related types: Confirmation

$style​

Sets the button's emphasis. Omit it for the default neutral style.

public readonly ?ButtonStyle $style;

Related types: ButtonStyle

$accessibilityLabel​

Sets the label read by screen readers in place of the visible text.

public readonly ?string $accessibilityLabel;

__construct​

Construct a validated immutable value.

public function __construct(PlainText|string $text, Workflow $workflow, string $actionId, ?Confirmation $confirm = NULL, ?ButtonStyle $style = NULL, ?string $accessibilityLabel = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
textPlainText|string — Sets the button label.
workflowWorkflow — Sets the workflow started when the button is clicked.
actionIdstring — Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
confirmConfirmation|null — Sets a confirmation dialog shown before the action is sent.
styleButtonStyle|null — Sets the button's emphasis. Omit it for the default neutral style.
accessibilityLabelstring|null — Sets the label read by screen readers in place of the visible text.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: ButtonStyle, Confirmation, JsonObject, PlainText, Workflow