Skip to main content

Elements

This page documents the Ruby API for elements. Values use keyword-only construction, validate before freezing, and serialize to Slack JSON.

ButtonElement​

An interactive button that sends a payload or opens a URL.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: text.

def self.new: (text: String | PlainText, ?action_id: (String)?, ?url: (String)?, ?value: (String)?, ?style: (:primary | :danger)?, ?confirm: (Confirmation)?, ?accessibility_label: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ButtonElement
ParameterDescription
textSets the button label.
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
urlSets a URL opened in the user's browser when the button is clicked. Slack still sends an interaction payload.
valueSets the application-defined value sent in interaction payloads.
styleSets the button's emphasis. Omit it for the default neutral style.
confirmSets a confirmation dialog shown before the action is sent.
accessibility_labelSets the label read by screen readers in place of the visible text.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ButtonElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: ButtonElement, Confirmation, PlainText

.[]

Keyword-only alias for .new.

def self.[]: (text: String | PlainText, ?action_id: (String)?, ?url: (String)?, ?value: (String)?, ?style: (:primary | :danger)?, ?confirm: (Confirmation)?, ?accessibility_label: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ButtonElement

Returns: ButtonElement

Related types: ButtonElement, Confirmation, PlainText

text​

Sets the button label. Wire key: text.

def text: () -> PlainText

Returns: PlainText

Related types: PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

url​

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

def url: () -> (String)?

Returns: (String)?

value​

Sets the application-defined value sent in interaction payloads. Wire key: value.

def value: () -> (String)?

Returns: (String)?

style​

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

def style: () -> (:primary | :danger)?

Returns: (:primary | :danger)?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

accessibility_label​

Sets the label read by screen readers in place of the visible text. Wire key: accessibility_label.

def accessibility_label: () -> (String)?

Returns: (String)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ButtonElement

Returns: ButtonElement

Related types: ButtonElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

ButtonStyle​

Visual emphasis for buttons and confirmation dialogs. Pass the wire symbol to constructor keywords.

ConstantSlack valueMeaning
PRIMARY:primaryGreen emphasis for the affirmative action.
DANGER:dangerRed emphasis for destructive actions.

ChannelMultiSelectElement​

A menu for selecting multiple public channels.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_channels: (Array[String])?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ChannelMultiSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_channelsAdds channel IDs that are selected when the menu loads.
confirmSets a confirmation dialog shown before the action is sent.
max_selected_itemsSets the maximum number of items a user can select.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ChannelMultiSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: ChannelMultiSelectElement, Confirmation, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_channels: (Array[String])?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ChannelMultiSelectElement

Returns: ChannelMultiSelectElement

Related types: ChannelMultiSelectElement, Confirmation, PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_channels​

Adds channel IDs that are selected when the menu loads. Wire key: initial_channels.

def initial_channels: () -> (Array[String])?

Returns: (Array[String])?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

max_selected_items​

Sets the maximum number of items a user can select. Wire key: max_selected_items.

def max_selected_items: () -> (Integer)?

Returns: (Integer)?

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ChannelMultiSelectElement

Returns: ChannelMultiSelectElement

Related types: ChannelMultiSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

ChannelSelectElement​

A menu for selecting one public channel.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_channel: (String)?, ?response_url_enabled: (bool)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ChannelSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_channelSets the channel ID selected when the menu loads.
response_url_enabledSets whether the selected conversation receives a response URL in the view submission payload. Only valid in modals.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ChannelSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: ChannelSelectElement, Confirmation, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_channel: (String)?, ?response_url_enabled: (bool)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ChannelSelectElement

Returns: ChannelSelectElement

Related types: ChannelSelectElement, Confirmation, PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_channel​

Sets the channel ID selected when the menu loads. Wire key: initial_channel.

def initial_channel: () -> (String)?

Returns: (String)?

response_url_enabled​

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

def response_url_enabled: () -> (bool)?

Returns: (bool)?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ChannelSelectElement

Returns: ChannelSelectElement

Related types: ChannelSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

CheckboxesElement​

A group of checkboxes.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: options.

def self.new: (?action_id: (String)?, options: Array[Option], ?initial_options: (Array[Option])?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> CheckboxesElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
optionsAdds selectable options in display order.
initial_optionsAdds options that are selected when the element loads. Each must match an option in the element.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: CheckboxesElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: CheckboxesElement, Confirmation, Option

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, options: Array[Option], ?initial_options: (Array[Option])?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> CheckboxesElement

Returns: CheckboxesElement

Related types: CheckboxesElement, Confirmation, Option

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

options​

Adds selectable options in display order. Wire key: options.

def options: () -> Array[Option]

Returns: Array[Option]

Related types: Option

initial_options​

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

def initial_options: () -> (Array[Option])?

Returns: (Array[Option])?

Related types: Option

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> CheckboxesElement

Returns: CheckboxesElement

Related types: CheckboxesElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

ConversationMultiSelectElement​

A menu for selecting multiple conversations.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_conversations: (Array[String])?, ?default_to_current_conversation: (bool)?, ?filter: (ConversationFilter)?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ConversationMultiSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_conversationsAdds conversation IDs that are selected when the menu loads.
default_to_current_conversationSets whether the menu pre-selects the conversation the user is viewing.
filterSets which conversation types the menu offers.
confirmSets a confirmation dialog shown before the action is sent.
max_selected_itemsSets the maximum number of items a user can select.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ConversationMultiSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, ConversationFilter, ConversationMultiSelectElement, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_conversations: (Array[String])?, ?default_to_current_conversation: (bool)?, ?filter: (ConversationFilter)?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ConversationMultiSelectElement

Returns: ConversationMultiSelectElement

Related types: Confirmation, ConversationFilter, ConversationMultiSelectElement, PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_conversations​

Adds conversation IDs that are selected when the menu loads. Wire key: initial_conversations.

def initial_conversations: () -> (Array[String])?

Returns: (Array[String])?

default_to_current_conversation​

Sets whether the menu pre-selects the conversation the user is viewing. Wire key: default_to_current_conversation.

def default_to_current_conversation: () -> (bool)?

Returns: (bool)?

filter​

Sets which conversation types the menu offers. Wire key: filter.

def filter: () -> (ConversationFilter)?

Returns: (ConversationFilter)?

Related types: ConversationFilter

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

max_selected_items​

Sets the maximum number of items a user can select. Wire key: max_selected_items.

def max_selected_items: () -> (Integer)?

Returns: (Integer)?

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ConversationMultiSelectElement

Returns: ConversationMultiSelectElement

Related types: ConversationMultiSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

ConversationSelectElement​

A menu for selecting one conversation.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_conversation: (String)?, ?default_to_current_conversation: (bool)?, ?filter: (ConversationFilter)?, ?response_url_enabled: (bool)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ConversationSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_conversationSets the conversation ID selected when the menu loads.
default_to_current_conversationSets whether the menu pre-selects the conversation the user is viewing.
filterSets which conversation types the menu offers.
response_url_enabledSets whether the selected conversation receives a response URL in the view submission payload. Only valid in modals.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ConversationSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, ConversationFilter, ConversationSelectElement, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_conversation: (String)?, ?default_to_current_conversation: (bool)?, ?filter: (ConversationFilter)?, ?response_url_enabled: (bool)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ConversationSelectElement

Returns: ConversationSelectElement

Related types: Confirmation, ConversationFilter, ConversationSelectElement, PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_conversation​

Sets the conversation ID selected when the menu loads. Wire key: initial_conversation.

def initial_conversation: () -> (String)?

Returns: (String)?

default_to_current_conversation​

Sets whether the menu pre-selects the conversation the user is viewing. Wire key: default_to_current_conversation.

def default_to_current_conversation: () -> (bool)?

Returns: (bool)?

filter​

Sets which conversation types the menu offers. Wire key: filter.

def filter: () -> (ConversationFilter)?

Returns: (ConversationFilter)?

Related types: ConversationFilter

response_url_enabled​

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

def response_url_enabled: () -> (bool)?

Returns: (bool)?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ConversationSelectElement

Returns: ConversationSelectElement

Related types: ConversationSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

DatePickerElement​

A calendar date picker.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_date: (String)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> DatePickerElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_dateSets the initially selected date, formatted as YYYY-MM-DD.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: DatePickerElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, DatePickerElement, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_date: (String)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> DatePickerElement

Returns: DatePickerElement

Related types: Confirmation, DatePickerElement, PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_date​

Sets the initially selected date, formatted as YYYY-MM-DD. Wire key: initial_date.

def initial_date: () -> (String)?

Returns: (String)?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> DatePickerElement

Returns: DatePickerElement

Related types: DatePickerElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

DateTimePickerElement​

A combined date and time picker.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_date_time: (Integer)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> DateTimePickerElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_date_timeSets the initially selected moment as a UNIX timestamp in seconds.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: DateTimePickerElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, DateTimePickerElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_date_time: (Integer)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> DateTimePickerElement

Returns: DateTimePickerElement

Related types: Confirmation, DateTimePickerElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_date_time​

Sets the initially selected moment as a UNIX timestamp in seconds. Wire key: initial_date_time.

def initial_date_time: () -> (Integer)?

Returns: (Integer)?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> DateTimePickerElement

Returns: DateTimePickerElement

Related types: DateTimePickerElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

Element​

A validated interactive, visual, or input element nested inside a Slack block.

EmailInputElement​

A single-line input that accepts an email address.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_value: (String)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> EmailInputElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_valueSets the value present when the input loads.
dispatch_action_configSets which user interactions send a block_actions payload.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: EmailInputElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: DispatchActionConfiguration, EmailInputElement, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_value: (String)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> EmailInputElement

Returns: EmailInputElement

Related types: DispatchActionConfiguration, EmailInputElement, PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_value​

Sets the value present when the input loads. Wire key: initial_value.

def initial_value: () -> (String)?

Returns: (String)?

dispatch_action_config​

Sets which user interactions send a block_actions payload. Wire key: dispatch_action_config.

def dispatch_action_config: () -> (DispatchActionConfiguration)?

Returns: (DispatchActionConfiguration)?

Related types: DispatchActionConfiguration

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> EmailInputElement

Returns: EmailInputElement

Related types: EmailInputElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

ExternalMultiSelectElement​

A menu for selecting multiple options loaded from your app.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?min_query_length: (Integer)?, ?initial_options: (Array[Option])?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ExternalMultiSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
min_query_lengthSets how many characters the user must type before Slack queries your options endpoint.
initial_optionsAdds options that are selected when the element loads. Each must match an option in the element.
confirmSets a confirmation dialog shown before the action is sent.
max_selected_itemsSets the maximum number of items a user can select.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ExternalMultiSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, ExternalMultiSelectElement, Option, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?min_query_length: (Integer)?, ?initial_options: (Array[Option])?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ExternalMultiSelectElement

Returns: ExternalMultiSelectElement

Related types: Confirmation, ExternalMultiSelectElement, Option, PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

min_query_length​

Sets how many characters the user must type before Slack queries your options endpoint. Wire key: min_query_length.

def min_query_length: () -> (Integer)?

Returns: (Integer)?

initial_options​

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

def initial_options: () -> (Array[Option])?

Returns: (Array[Option])?

Related types: Option

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

max_selected_items​

Sets the maximum number of items a user can select. Wire key: max_selected_items.

def max_selected_items: () -> (Integer)?

Returns: (Integer)?

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ExternalMultiSelectElement

Returns: ExternalMultiSelectElement

Related types: ExternalMultiSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

ExternalSelectElement​

A menu for selecting one option loaded from your app.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?min_query_length: (Integer)?, ?initial_option: (Option)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ExternalSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
min_query_lengthSets how many characters the user must type before Slack queries your options endpoint.
initial_optionSets the option selected when the element loads. It must match an option in the element.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ExternalSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, ExternalSelectElement, Option, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?min_query_length: (Integer)?, ?initial_option: (Option)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ExternalSelectElement

Returns: ExternalSelectElement

Related types: Confirmation, ExternalSelectElement, Option, PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

min_query_length​

Sets how many characters the user must type before Slack queries your options endpoint. Wire key: min_query_length.

def min_query_length: () -> (Integer)?

Returns: (Integer)?

initial_option​

Sets the option selected when the element loads. It must match an option in the element. Wire key: initial_option.

def initial_option: () -> (Option)?

Returns: (Option)?

Related types: Option

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ExternalSelectElement

Returns: ExternalSelectElement

Related types: ExternalSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

FeedbackButtonsElement​

A pair of thumbs-up and thumbs-down feedback buttons.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: positive_button, negative_button.

def self.new: (positive_button: FeedbackButton, negative_button: FeedbackButton, ?action_id: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> FeedbackButtonsElement
ParameterDescription
positive_buttonSets the button for positive feedback.
negative_buttonSets the button for negative feedback.
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: FeedbackButtonsElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: FeedbackButton, FeedbackButtonsElement

.[]​

Keyword-only alias for .new.

def self.[]: (positive_button: FeedbackButton, negative_button: FeedbackButton, ?action_id: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> FeedbackButtonsElement

Returns: FeedbackButtonsElement

Related types: FeedbackButton, FeedbackButtonsElement

positive_button​

Sets the button for positive feedback. Wire key: positive_button.

def positive_button: () -> FeedbackButton

Returns: FeedbackButton

Related types: FeedbackButton

negative_button​

Sets the button for negative feedback. Wire key: negative_button.

def negative_button: () -> FeedbackButton

Returns: FeedbackButton

Related types: FeedbackButton

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> FeedbackButtonsElement

Returns: FeedbackButtonsElement

Related types: FeedbackButtonsElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

FileInputElement​

An input that lets users upload files.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?filetypes: (Array[String])?, ?max_files: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> FileInputElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
filetypesAdds accepted file extensions, such as pdf or png.
max_filesSets the maximum number of files a user can upload.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: FileInputElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: FileInputElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?filetypes: (Array[String])?, ?max_files: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> FileInputElement

Returns: FileInputElement

Related types: FileInputElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

filetypes​

Adds accepted file extensions, such as pdf or png. Wire key: filetypes.

def filetypes: () -> (Array[String])?

Returns: (Array[String])?

max_files​

Sets the maximum number of files a user can upload. Wire key: max_files.

def max_files: () -> (Integer)?

Returns: (Integer)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> FileInputElement

Returns: FileInputElement

Related types: FileInputElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

IconButtonElement​

A button that shows an icon instead of text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: text.

def self.new: (text: String | PlainText, ?icon: (:trash)?, ?action_id: (String)?, ?value: (String)?, ?confirm: (Confirmation)?, ?accessibility_label: (String)?, ?visible_to_user_ids: (Array[String])?, ?additional_fields: Hash[String | Symbol, untyped]?) -> IconButtonElement
ParameterDescription
textSets the text used as the button's accessible name.
iconSets the icon shown on the button.
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
valueSets the application-defined value sent in interaction payloads.
confirmSets a confirmation dialog shown before the action is sent.
accessibility_labelSets the label read by screen readers in place of the visible text.
visible_to_user_idsAdds the IDs of users who can see this button.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: IconButtonElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, IconButtonElement, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (text: String | PlainText, ?icon: (:trash)?, ?action_id: (String)?, ?value: (String)?, ?confirm: (Confirmation)?, ?accessibility_label: (String)?, ?visible_to_user_ids: (Array[String])?, ?additional_fields: Hash[String | Symbol, untyped]?) -> IconButtonElement

Returns: IconButtonElement

Related types: Confirmation, IconButtonElement, PlainText

text​

Sets the text used as the button's accessible name. Wire key: text.

def text: () -> PlainText

Returns: PlainText

Related types: PlainText

icon​

Sets the icon shown on the button. Wire key: icon.

def icon: () -> (:trash)?

Returns: (:trash)?

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

value​

Sets the application-defined value sent in interaction payloads. Wire key: value.

def value: () -> (String)?

Returns: (String)?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

accessibility_label​

Sets the label read by screen readers in place of the visible text. Wire key: accessibility_label.

def accessibility_label: () -> (String)?

Returns: (String)?

visible_to_user_ids​

Adds the IDs of users who can see this button. Wire key: visible_to_user_ids.

def visible_to_user_ids: () -> (Array[String])?

Returns: (Array[String])?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> IconButtonElement

Returns: IconButtonElement

Related types: IconButtonElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

IconButtonIcon​

Icons supported by icon buttons. Pass the wire symbol to constructor keywords.

ConstantSlack valueMeaning
TRASH:trashA trash can, for delete actions.

ImageElement​

An image displayed inside a section, context, or card.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: alt_text.

def self.new: (alt_text: String, ?image_url: (String)?, ?slack_file: (SlackFile)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ImageElement
ParameterDescription
alt_textSets a plain-text summary of the image or video for assistive technology.
image_urlSets the publicly accessible URL of the image. Cannot be combined with a Slack file.
slack_fileSets a file hosted in Slack as the image source. Cannot be combined with an image URL.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ImageElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: ImageElement, SlackFile

.[]​

Keyword-only alias for .new.

def self.[]: (alt_text: String, ?image_url: (String)?, ?slack_file: (SlackFile)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ImageElement

Returns: ImageElement

Related types: ImageElement, SlackFile

alt_text​

Sets a plain-text summary of the image or video for assistive technology. Wire key: alt_text.

def alt_text: () -> String

Returns: String

image_url​

Sets the publicly accessible URL of the image. Cannot be combined with a Slack file. Wire key: image_url.

def image_url: () -> (String)?

Returns: (String)?

slack_file​

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

def slack_file: () -> (SlackFile)?

Returns: (SlackFile)?

Related types: SlackFile

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ImageElement

Returns: ImageElement

Related types: ImageElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

InputElement​

An element that can be placed in an input block.

NumberInputElement​

An input that accepts whole or decimal numbers.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: is_decimal_allowed.

def self.new: (?action_id: (String)?, is_decimal_allowed: bool, ?initial_value: (String)?, ?min_value: (Integer | Float)?, ?max_value: (Integer | Float)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> NumberInputElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
is_decimal_allowedSets whether the input accepts decimal numbers.
initial_valueSets the number present when the input loads, as a string such as 42 or 3.5.
min_valueSets the smallest accepted number.
max_valueSets the largest accepted number.
dispatch_action_configSets which user interactions send a block_actions payload.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: NumberInputElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: DispatchActionConfiguration, NumberInputElement, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, is_decimal_allowed: bool, ?initial_value: (String)?, ?min_value: (Integer | Float)?, ?max_value: (Integer | Float)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> NumberInputElement

Returns: NumberInputElement

Related types: DispatchActionConfiguration, NumberInputElement, PlainText

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

is_decimal_allowed​

Sets whether the input accepts decimal numbers. Wire key: is_decimal_allowed.

def is_decimal_allowed: () -> bool

Returns: bool

initial_value​

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

def initial_value: () -> (String)?

Returns: (String)?

min_value​

Sets the smallest accepted number. Wire key: min_value.

def min_value: () -> (Integer | Float)?

Returns: (Integer | Float)?

max_value​

Sets the largest accepted number. Wire key: max_value.

def max_value: () -> (Integer | Float)?

Returns: (Integer | Float)?

dispatch_action_config​

Sets which user interactions send a block_actions payload. Wire key: dispatch_action_config.

def dispatch_action_config: () -> (DispatchActionConfiguration)?

Returns: (DispatchActionConfiguration)?

Related types: DispatchActionConfiguration

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> NumberInputElement

Returns: NumberInputElement

Related types: NumberInputElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

OverflowElement​

A compact menu of up to five options.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: options.

def self.new: (?action_id: (String)?, options: Array[Option], ?confirm: (Confirmation)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> OverflowElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
optionsAdds selectable options in display order.
confirmSets a confirmation dialog shown before the action is sent.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: OverflowElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, Option, OverflowElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, options: Array[Option], ?confirm: (Confirmation)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> OverflowElement

Returns: OverflowElement

Related types: Confirmation, Option, OverflowElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

options​

Adds selectable options in display order. Wire key: options.

def options: () -> Array[Option]

Returns: Array[Option]

Related types: Option

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> OverflowElement

Returns: OverflowElement

Related types: OverflowElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

PlainTextInputElement​

A single-line or multi-line free-text input.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_value: (String)?, ?multiline: (bool)?, ?min_length: (Integer)?, ?max_length: (Integer)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> PlainTextInputElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_valueSets the value present when the input loads.
multilineSets whether the input is a multi-line text area.
min_lengthSets the minimum number of characters the user must enter.
max_lengthSets the maximum number of characters the user can enter.
dispatch_action_configSets which user interactions send a block_actions payload.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: PlainTextInputElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: DispatchActionConfiguration, PlainText, PlainTextInputElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_value: (String)?, ?multiline: (bool)?, ?min_length: (Integer)?, ?max_length: (Integer)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> PlainTextInputElement

Returns: PlainTextInputElement

Related types: DispatchActionConfiguration, PlainText, PlainTextInputElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_value​

Sets the value present when the input loads. Wire key: initial_value.

def initial_value: () -> (String)?

Returns: (String)?

multiline​

Sets whether the input is a multi-line text area. Wire key: multiline.

def multiline: () -> (bool)?

Returns: (bool)?

min_length​

Sets the minimum number of characters the user must enter. Wire key: min_length.

def min_length: () -> (Integer)?

Returns: (Integer)?

max_length​

Sets the maximum number of characters the user can enter. Wire key: max_length.

def max_length: () -> (Integer)?

Returns: (Integer)?

dispatch_action_config​

Sets which user interactions send a block_actions payload. Wire key: dispatch_action_config.

def dispatch_action_config: () -> (DispatchActionConfiguration)?

Returns: (DispatchActionConfiguration)?

Related types: DispatchActionConfiguration

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> PlainTextInputElement

Returns: PlainTextInputElement

Related types: PlainTextInputElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RadioButtonsElement​

A group of radio buttons.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: options.

def self.new: (?action_id: (String)?, options: Array[Option], ?initial_option: (Option)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RadioButtonsElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
optionsAdds selectable options in display order.
initial_optionSets the option selected when the element loads. It must match an option in the element.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RadioButtonsElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, Option, RadioButtonsElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, options: Array[Option], ?initial_option: (Option)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RadioButtonsElement

Returns: RadioButtonsElement

Related types: Confirmation, Option, RadioButtonsElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

options​

Adds selectable options in display order. Wire key: options.

def options: () -> Array[Option]

Returns: Array[Option]

Related types: Option

initial_option​

Sets the option selected when the element loads. It must match an option in the element. Wire key: initial_option.

def initial_option: () -> (Option)?

Returns: (Option)?

Related types: Option

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RadioButtonsElement

Returns: RadioButtonsElement

Related types: RadioButtonsElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextInputElement​

An input that accepts formatted rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: action_id.

def self.new: (action_id: String, ?initial_value: (RichTextBlock)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?min_lines: (Integer)?, ?max_lines: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextInputElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_valueSets the rich text present when the input loads.
dispatch_action_configSets which user interactions send a block_actions payload.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
min_linesSets the minimum visible height of the input, in lines.
max_linesSets the maximum visible height of the input, in lines.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextInputElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: DispatchActionConfiguration, PlainText, RichTextBlock, RichTextInputElement

.[]​

Keyword-only alias for .new.

def self.[]: (action_id: String, ?initial_value: (RichTextBlock)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?min_lines: (Integer)?, ?max_lines: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextInputElement

Returns: RichTextInputElement

Related types: DispatchActionConfiguration, PlainText, RichTextBlock, RichTextInputElement

action_id​

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. Wire key: action_id.

def action_id: () -> String

Returns: String

initial_value​

Sets the rich text present when the input loads. Wire key: initial_value.

def initial_value: () -> (RichTextBlock)?

Returns: (RichTextBlock)?

Related types: RichTextBlock

dispatch_action_config​

Sets which user interactions send a block_actions payload. Wire key: dispatch_action_config.

def dispatch_action_config: () -> (DispatchActionConfiguration)?

Returns: (DispatchActionConfiguration)?

Related types: DispatchActionConfiguration

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

min_lines​

Sets the minimum visible height of the input, in lines. Wire key: min_lines.

def min_lines: () -> (Integer)?

Returns: (Integer)?

max_lines​

Sets the maximum visible height of the input, in lines. Wire key: max_lines.

def max_lines: () -> (Integer)?

Returns: (Integer)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextInputElement

Returns: RichTextInputElement

Related types: RichTextInputElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

StaticMultiSelectElement​

A menu for selecting multiple options defined in the payload.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?options: (Array[Option])?, ?option_groups: (Array[OptionGroup])?, ?initial_options: (Array[Option])?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> StaticMultiSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
optionsAdds selectable options in display order.
option_groupsAdds labelled groups of options in display order. Cannot be combined with ungrouped options.
initial_optionsAdds options that are selected when the element loads. Each must match an option in the element.
confirmSets a confirmation dialog shown before the action is sent.
max_selected_itemsSets the maximum number of items a user can select.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: StaticMultiSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, Option, OptionGroup, PlainText, StaticMultiSelectElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?options: (Array[Option])?, ?option_groups: (Array[OptionGroup])?, ?initial_options: (Array[Option])?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> StaticMultiSelectElement

Returns: StaticMultiSelectElement

Related types: Confirmation, Option, OptionGroup, PlainText, StaticMultiSelectElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

options​

Adds selectable options in display order. Wire key: options.

def options: () -> (Array[Option])?

Returns: (Array[Option])?

Related types: Option

option_groups​

Adds labelled groups of options in display order. Cannot be combined with ungrouped options. Wire key: option_groups.

def option_groups: () -> (Array[OptionGroup])?

Returns: (Array[OptionGroup])?

Related types: OptionGroup

initial_options​

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

def initial_options: () -> (Array[Option])?

Returns: (Array[Option])?

Related types: Option

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

max_selected_items​

Sets the maximum number of items a user can select. Wire key: max_selected_items.

def max_selected_items: () -> (Integer)?

Returns: (Integer)?

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> StaticMultiSelectElement

Returns: StaticMultiSelectElement

Related types: StaticMultiSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

StaticSelectElement​

A menu for selecting one option defined in the payload.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?options: (Array[Option])?, ?option_groups: (Array[OptionGroup])?, ?initial_option: (Option)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> StaticSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
optionsAdds selectable options in display order.
option_groupsAdds labelled groups of options in display order. Cannot be combined with ungrouped options.
initial_optionSets the option selected when the element loads. It must match an option in the element.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: StaticSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, Option, OptionGroup, PlainText, StaticSelectElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?options: (Array[Option])?, ?option_groups: (Array[OptionGroup])?, ?initial_option: (Option)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> StaticSelectElement

Returns: StaticSelectElement

Related types: Confirmation, Option, OptionGroup, PlainText, StaticSelectElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

options​

Adds selectable options in display order. Wire key: options.

def options: () -> (Array[Option])?

Returns: (Array[Option])?

Related types: Option

option_groups​

Adds labelled groups of options in display order. Cannot be combined with ungrouped options. Wire key: option_groups.

def option_groups: () -> (Array[OptionGroup])?

Returns: (Array[OptionGroup])?

Related types: OptionGroup

initial_option​

Sets the option selected when the element loads. It must match an option in the element. Wire key: initial_option.

def initial_option: () -> (Option)?

Returns: (Option)?

Related types: Option

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> StaticSelectElement

Returns: StaticSelectElement

Related types: StaticSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

TimePickerElement​

A time-of-day picker.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_time: (String)?, ?timezone: (String)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> TimePickerElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_timeSets the initially selected time, formatted as HH:mm in 24-hour time.
timezoneSets the IANA time zone used to display the time, such as Australia/Brisbane.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: TimePickerElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, PlainText, TimePickerElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_time: (String)?, ?timezone: (String)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> TimePickerElement

Returns: TimePickerElement

Related types: Confirmation, PlainText, TimePickerElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_time​

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

def initial_time: () -> (String)?

Returns: (String)?

timezone​

Sets the IANA time zone used to display the time, such as Australia/Brisbane. Wire key: timezone.

def timezone: () -> (String)?

Returns: (String)?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> TimePickerElement

Returns: TimePickerElement

Related types: TimePickerElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

UrlInputElement​

A single-line input that accepts a URL.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_value: (String)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> UrlInputElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_valueSets the value present when the input loads.
dispatch_action_configSets which user interactions send a block_actions payload.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: UrlInputElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: DispatchActionConfiguration, PlainText, UrlInputElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_value: (String)?, ?dispatch_action_config: (DispatchActionConfiguration)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> UrlInputElement

Returns: UrlInputElement

Related types: DispatchActionConfiguration, PlainText, UrlInputElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_value​

Sets the value present when the input loads. Wire key: initial_value.

def initial_value: () -> (String)?

Returns: (String)?

dispatch_action_config​

Sets which user interactions send a block_actions payload. Wire key: dispatch_action_config.

def dispatch_action_config: () -> (DispatchActionConfiguration)?

Returns: (DispatchActionConfiguration)?

Related types: DispatchActionConfiguration

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> UrlInputElement

Returns: UrlInputElement

Related types: UrlInputElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

UserMultiSelectElement​

A menu for selecting multiple workspace users.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_users: (Array[String])?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> UserMultiSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_usersAdds user IDs that are selected when the menu loads.
confirmSets a confirmation dialog shown before the action is sent.
max_selected_itemsSets the maximum number of items a user can select.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: UserMultiSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, PlainText, UserMultiSelectElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_users: (Array[String])?, ?confirm: (Confirmation)?, ?max_selected_items: (Integer)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> UserMultiSelectElement

Returns: UserMultiSelectElement

Related types: Confirmation, PlainText, UserMultiSelectElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_users​

Adds user IDs that are selected when the menu loads. Wire key: initial_users.

def initial_users: () -> (Array[String])?

Returns: (Array[String])?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

max_selected_items​

Sets the maximum number of items a user can select. Wire key: max_selected_items.

def max_selected_items: () -> (Integer)?

Returns: (Integer)?

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> UserMultiSelectElement

Returns: UserMultiSelectElement

Related types: UserMultiSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

UserSelectElement​

A menu for selecting one workspace user.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?action_id: (String)?, ?initial_user: (String)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> UserSelectElement
ParameterDescription
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
initial_userSets the user ID selected when the menu loads.
confirmSets a confirmation dialog shown before the action is sent.
focus_on_loadSets whether the element receives focus when the view opens. Only one element per view may do so.
placeholderSets the placeholder text shown before a value is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: UserSelectElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, PlainText, UserSelectElement

.[]​

Keyword-only alias for .new.

def self.[]: (?action_id: (String)?, ?initial_user: (String)?, ?confirm: (Confirmation)?, ?focus_on_load: (bool)?, ?placeholder: (String | PlainText)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> UserSelectElement

Returns: UserSelectElement

Related types: Confirmation, PlainText, UserSelectElement

action_id​

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. Wire key: action_id.

def action_id: () -> (String)?

Returns: (String)?

initial_user​

Sets the user ID selected when the menu loads. Wire key: initial_user.

def initial_user: () -> (String)?

Returns: (String)?

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

focus_on_load​

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

def focus_on_load: () -> (bool)?

Returns: (bool)?

placeholder​

Sets the placeholder text shown before a value is chosen. Wire key: placeholder.

def placeholder: () -> (PlainText)?

Returns: (PlainText)?

Related types: PlainText

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> UserSelectElement

Returns: UserSelectElement

Related types: UserSelectElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

WorkflowButtonElement​

A button that starts a workflow through a link trigger.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: text, workflow, action_id.

def self.new: (text: String | PlainText, workflow: Workflow, action_id: String, ?confirm: (Confirmation)?, ?style: (:primary | :danger)?, ?accessibility_label: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> WorkflowButtonElement
ParameterDescription
textSets the button label.
workflowSets the workflow started when the button is clicked.
action_idSets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
confirmSets a confirmation dialog shown before the action is sent.
styleSets the button's emphasis. Omit it for the default neutral style.
accessibility_labelSets the label read by screen readers in place of the visible text.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: WorkflowButtonElement

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, PlainText, Workflow, WorkflowButtonElement

.[]​

Keyword-only alias for .new.

def self.[]: (text: String | PlainText, workflow: Workflow, action_id: String, ?confirm: (Confirmation)?, ?style: (:primary | :danger)?, ?accessibility_label: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> WorkflowButtonElement

Returns: WorkflowButtonElement

Related types: Confirmation, PlainText, Workflow, WorkflowButtonElement

text​

Sets the button label. Wire key: text.

def text: () -> PlainText

Returns: PlainText

Related types: PlainText

workflow​

Sets the workflow started when the button is clicked. Wire key: workflow.

def workflow: () -> Workflow

Returns: Workflow

Related types: Workflow

action_id​

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. Wire key: action_id.

def action_id: () -> String

Returns: String

confirm​

Sets a confirmation dialog shown before the action is sent. Wire key: confirm.

def confirm: () -> (Confirmation)?

Returns: (Confirmation)?

Related types: Confirmation

style​

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

def style: () -> (:primary | :danger)?

Returns: (:primary | :danger)?

accessibility_label​

Sets the label read by screen readers in place of the visible text. Wire key: accessibility_label.

def accessibility_label: () -> (String)?

Returns: (String)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> WorkflowButtonElement

Returns: WorkflowButtonElement

Related types: WorkflowButtonElement

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String