Icon button
A compact, icon-only button for a context_actions row.
icon_button renders a single glyph with no visible label, with the label available as a tooltip
and as the accessible name. It’s built for the trailing row of small actions under an
AI-generated message: pair it with feedback buttons inside a
context_actions block, or drop it into an actions block on its own.
Fields
typestring
Always `icon_button`.
stringiconstring
The icon to show, e.g. "trash". See "Supported icons" below.
stringtextPlainTextElement
Shown as a tooltip on hover, and used as the accessible name when accessibility_label is absent.
PlainTextElementaction_id?string
Identifies this action in the interaction payload. Must be unique within the block. Maximum length is 255 characters.
stringvalue?string
Sent back in the interaction payload when the button is clicked.
stringaccessibility_label?string
Read by screen readers instead of `text`. Maximum length is 75 characters.
stringconfirm?ConfirmationDialog
Shows a confirmation dialog before the click is dispatched. See Confirmation dialogs.
ConfirmationDialogSupported icons
This library renders a fixed set of icon names with an inline glyph; any other name falls back to a generic kebab icon rather than rendering nothing:
trash, delete, calendar, clock, time, external-link, link, workflow, more,
chevron-down.
Examples
On its own in an actions block
Alongside feedback buttons
The icon button is designed to sit next to feedback buttons in a
context_actions row, as Slack does under an assistant message.
With a confirmation dialog
Interactivity
Clicking the button (after any confirm dialog is accepted) calls onAction with an icon_button
action:
{
"type": "icon_button",
"action_id": "remove",
"block_id": "b1",
"action_ts": "1706000000.000100",
"value": "row-1"
}
value is only included when the element sets it. Like a button, icon_button doesn’t write to
state.values: it’s a one-shot action.
Related
Feedback buttons
Thumbs up/down feedback, usually placed right next to an icon button.
Button
A labeled button for a primary action instead of a small icon-only one.
Confirmation dialogs
Add a confirm step to any element with the confirm object.
Elements overview
Where each element can live, and how action_id and block_id fit together.