button_element: Button Element

View source: R/block_elements.R

button_elementR Documentation

Button Element


An interactive component that inserts a button. The button can be a trigger for anything from opening a simple link to starting a complex workflow. To use interactive components, you will need to make some changes to prepare your app. Read our guide to enabling interactivity. Works with block types: Section Actions


  action_id = NULL,
  url = NULL,
  value = NULL,
  style = NULL,
  confirm = NULL



A text_object that defines the button's text. Can only be of type: plain_text. Maximum length for the text in this field is 75 characters.


An identifier for the action triggered when the checkbox group is changed. You can use this when you receive an interaction payload to identify the source of the action. Should be unique among all other action_ids in the containing block. Maximum length for this field is 255 characters.


A URL to load in the user's browser when the button is clicked. Maximum length for this field is 3000 characters. If you're using url, you'll still receive an interaction payload and will need to send an acknowledgment response.


The value to send along with the interaction payload. Maximum length for this field is 2000 characters.


Decorates buttons with alternative visual color schemes. Use this option with restraint. primary gives buttons a green outline and text, ideal for affirmation or confirmation actions. primary should only be used for one button within a set. danger gives buttons a red outline and text, and should be used when the action is destructive. Use danger even more sparingly than primary. If you don't include this field, the default button style will be used.


A confirm_object that defines an optional confirmation dialog after the button is clicked.


A button element

See Also


Other Elements: channels_multi_select_menu(), channels_select_menu(), checkbox_element(), conversations_multi_select_menu(), conversations_select_menu(), datepicker_element(), external_multi_select_menu(), external_select_menu(), image_element(), overflow_menu_element(), plain_text_input_element(), radio_button_group_element(), static_multi_select_menu(), static_select_menu(), timepicker_element(), users_multi_select_menu(), users_select_menu()

samterfa/slackme documentation built on April 11, 2022, 3:29 a.m.