View source: R/block_elements.R
button_element | R Documentation |
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
button_element( text, action_id = NULL, url = NULL, value = NULL, style = NULL, confirm = NULL )
text |
A |
action_id |
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. |
url |
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. |
value |
The value to send along with the interaction payload. Maximum length for this field is 2000 characters. |
style |
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. |
confirm |
A |
A button element
https://api.slack.com/reference/block-kit/block-elements#button
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.