# Overflow menu element

Allows users to press a button to view a list of options.

| | |
|---|---|
| **Type** | `overflow` |
| **Available in** | Messages, Modals, Home tab |
| **Works in blocks** | [Section block](https://workstation.repzo.com/docs/developers/block-kit/blocks/section-block), [Actions block](https://workstation.repzo.com/docs/developers/block-kit/blocks/actions-block) |

## Usage

Unlike the select menu, there is no type-ahead field, and the button always appears with an ellipsis ("…") rather than customizable text. Use it for a compact list of less important actions, for example after a row of buttons.

Choosing an option sends your app a `block_actions` payload with the option, copied from your element:

```json
{
  "type": "overflow",
  "action_id": "invoice_menu",
  "block_id": "invoice_inv2048",
  "selected_option": { "text": { "type": "plain_text", "text": "Send reminder" }, "value": "remind" },
  "action_ts": "1793786400.000000"
}
```

See the [button element](https://workstation.repzo.com/docs/developers/block-kit/elements/button-element) for the rest of the payload.

## Fields

| Field | Type | Description | Required? |
|---|---|---|---|
| `type` | String | The type of element. In this case `type` is always `overflow`. | Required |
| `action_id` | String | An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to identify the source of the action. Should be unique among all other `action_id`s in the containing block. Maximum length is 255 characters. If you leave it out, Repzo generates one. | Optional |
| `options` | Array of [Option object](https://workstation.repzo.com/docs/developers/block-kit/objects/option-object) | An array of between two and five option objects to display in the menu. An option may carry a `url`. | Required |
| `confirm` | [Confirmation dialog object](https://workstation.repzo.com/docs/developers/block-kit/objects/confirmation-dialog-object) | A confirm object that defines an optional confirmation dialog that appears after a menu item is selected. If the reader cancels, nothing is sent to your app. | Optional |

> **How Repzo Chat differs from Slack**
>
> - An option with a `url` opens the link (Repzo pages open inside the app) and still sends `block_actions`, with the `url` in `selected_option`.

## Examples

### A section with an overflow menu

```json
{
  "blocks": [
    {
      "type": "section",
      "block_id": "invoice_inv2048",
      "text": {
        "type": "mrkdwn",
        "text": "*INV-2048* · Acme Logistics · *$7,250*\nDue 28 October — 12 days overdue"
      },
      "accessory": {
        "type": "overflow",
        "action_id": "invoice_menu",
        "options": [
          {
            "text": {
              "type": "plain_text",
              "text": "Send reminder"
            },
            "value": "remind"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Record a payment"
            },
            "value": "record_payment"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Set up a payment plan"
            },
            "value": "payment_plan"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Open invoice"
            },
            "value": "open",
            "url": "https://example.com/invoices/INV-2048"
          }
        ]
      }
    }
  ]
}
```

## Related

- [Block elements](https://workstation.repzo.com/docs/developers/block-kit/elements)
- [Block Kit overview](https://workstation.repzo.com/docs/developers/block-kit)
