---
title: Context actions
description: A compact row of feedback and icon buttons, typically under an AI-generated message.
---

`context_actions` holds a small row of interactive elements, feedback buttons and icon
buttons, the way `context` holds a row of static text and images. Slack shows it under an
assistant's response for a "was this helpful" prompt, paired with actions like copy or retry.

<Preview
  payload={{
    blocks: [
      {
        type: "context_actions",
        elements: [
          {
            type: "feedback_buttons",
            action_id: "feedback",
            positive_button: {
              text: { type: "plain_text", text: "Good response" },
              value: "positive",
            },
            negative_button: {
              text: { type: "plain_text", text: "Bad response" },
              value: "negative",
            },
          },
          {
            type: "icon_button",
            action_id: "remove",
            icon: "trash",
            text: { type: "plain_text", text: "Remove" },
            accessibility_label: "Remove this response",
          },
        ],
      },
    ],
  }}
  actions
/>

## Fields

| Prop | Type | Default | Description |
| - | - | - | - |
| `type` | `string` | - | Always `context_actions`. |
| `elements` | `(FeedbackButtons \| IconButton)[]` | - | The row's elements, in order. Slack allows up to 5. |
| `block_id?` | `string` | - | A unique identifier for this block. Auto-generated if omitted. Maximum length is 255 characters. |

Only two element types are allowed here: [feedback buttons](/elements/feedback-buttons) (a
thumbs-up/thumbs-down pair) and [icon buttons](/elements/icon-button) (a single small glyph
button). See those pages for their own fields and interactivity.

## Examples

### Feedback and a remove action

The same row as above, matching how this appears under an AI agent's message: feedback buttons
first, then a trailing icon button for a secondary action.

<Preview
  payload={{
    blocks: [
      {
        type: "rich_text",
        elements: [
          {
            type: "rich_text_section",
            elements: [{ type: "text", text: "Here's a summary of what I found." }],
          },
        ],
      },
      {
        type: "context_actions",
        elements: [
          {
            type: "feedback_buttons",
            action_id: "feedback",
            positive_button: {
              text: { type: "plain_text", text: "Good response" },
              accessibility_label: "Good response",
              value: "positive",
            },
            negative_button: {
              text: { type: "plain_text", text: "Bad response" },
              accessibility_label: "Bad response",
              value: "negative",
            },
          },
          {
            type: "icon_button",
            action_id: "remove",
            icon: "trash",
            text: { type: "plain_text", text: "Remove" },
            accessibility_label: "Remove this response",
          },
        ],
      },
    ],
  }}
  actions
/>

### Icon buttons only

A row doesn't need feedback buttons: any mix of up to 5 icon buttons works too.

<Preview
  payload={{
    blocks: [
      {
        type: "context_actions",
        elements: [
          {
            type: "icon_button",
            action_id: "copy",
            icon: "link",
            text: { type: "plain_text", text: "Copy link" },
          },
          {
            type: "icon_button",
            action_id: "retry",
            icon: "chevron-down",
            text: { type: "plain_text", text: "Retry" },
          },
        ],
      },
    ],
  }}
  actions
/>

## Interactivity

Each element dispatches its own action shape. A feedback button sends its picked button's `value`
and `text`:

```json
{
  "type": "feedback_buttons",
  "action_id": "feedback",
  "block_id": "b1",
  "action_ts": "1706000000.000100",
  "value": "positive",
  "text": { "type": "plain_text", "text": "Good response" }
}
```

An icon button sends a plain action, with `value` only when the element sets it:

```json
{
  "type": "icon_button",
  "action_id": "remove",
  "block_id": "b1",
  "action_ts": "1706000000.000100"
}
```

Feedback buttons also toggle: picking a thumb writes `{ type: "feedback_buttons", value }` to
`state.values`, and clicking the same thumb again clears it. Icon buttons never write to
`state.values`, since they're one-shot actions. See [feedback buttons](/elements/feedback-buttons) and
[icon button](/elements/icon-button) for the full details.

## Related

**[Context](/blocks/context)**

The non-interactive counterpart: static text and images instead of buttons.

**[Actions](/blocks/actions)**

A general-purpose row for buttons, selects, and other interactive elements.

**[Plan](/blocks/plan)**

Another block built for agentic surfaces, showing a multi-step plan.
