Skip to content

A small button that shows an icon instead of text.

Type icon_button
Available in Messages
Works in blocks Context actions block

Clicking it sends your app a block_actions payload:

{
"type": "icon_button",
"action_id": "delete_reminder",
"block_id": "reminder_r88",
"value": "R-88",
"action_ts": "1793786400.000000"
}

See the button element for the rest of the payload.

Field Type Description Required?
type String The type of element. In this case type is always icon_button. Required
icon String The icon to show. The trash icon is the only icon available at this time. Required
text Text object A text object that defines the button’s text, shown as its tooltip. Can only be of type: plain_text. Maximum length for the text in this field is 75 characters. Required
action_id String An identifier for the action triggered when the button is clicked. 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 is 255 characters. If you leave it out, Repzo generates one. Optional
value String The value to send along with the interaction payload. Maximum length is 2000 characters. Optional
confirm Confirmation dialog object A confirm object that defines an optional confirmation dialog that appears after the button is clicked. If the reader cancels, nothing is sent to your app. Optional
accessibility_label String A label for longer descriptive text about the button. This label will be read out by screen readers instead of the button text object. Maximum length is 75 characters. Optional

A delete button with a confirmation — how it renders in Repzo Chat

{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Reminder: send the revised quote to *Contoso Clinics* on Thursday at 09:00."
}
},
{
"type": "context_actions",
"block_id": "reminder_r88",
"elements": [
{
"type": "icon_button",
"icon": "trash",
"action_id": "delete_reminder",
"text": {
"type": "plain_text",
"text": "Delete reminder"
},
"value": "R-88",
"confirm": {
"title": {
"type": "plain_text",
"text": "Delete this reminder?"
},
"text": {
"type": "plain_text",
"text": "You won't be reminded about this quote."
},
"confirm": {
"type": "plain_text",
"text": "Delete"
},
"deny": {
"type": "plain_text",
"text": "Keep"
},
"style": "danger"
}
}
]
}
]
}