Checkboxes element
Allows users to choose multiple items from a list of options.
| Type | checkboxes |
| Available in | Messages, Modals, Home tab |
| Works in blocks | Section block, Actions block, Input block |
Every tick or untick sends your app a block_actions payload whose action lists all the options that are ticked now, copied from your element (unticking the last one sends an empty list):
{ "type": "checkboxes", "action_id": "onboarding_steps", "block_id": "onboarding_northwind", "selected_options": [ { "text": { "type": "plain_text", "text": "Import contacts" }, "value": "import_contacts" } ], "action_ts": "1793786400.000000"}Only options your element offers can be sent. See the button element for the rest of the payload.
The current value is also reported in state.values[block_id][action_id] (as { "type": …, <value field> }) of every later interaction with the same message or view.
Inside an input block, changing the value sends nothing on its own: your app reads it from view.state.values in the view_submission payload. Set dispatch_action: true on the input block to also receive a block_actions payload on every change.
Fields
Section titled “Fields”| Field | Type | Description | Required? |
|---|---|---|---|
type |
String | The type of element. In this case type is always checkboxes. |
Required |
action_id |
String | 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 is 255 characters. If you leave it out, Repzo generates one. |
Optional |
options |
Array of Option object | An array of option objects. A maximum of 10 options are allowed. | Required |
initial_options |
Array of Option object | An array of option objects that exactly matches one or more of the options within options. These options will be selected when the checkbox group initially loads. |
Optional |
confirm |
Confirmation dialog object | A confirm object that defines an optional confirmation dialog that appears after clicking one of the checkboxes in this element. If the reader cancels, nothing is sent to your app. | Optional |
focus_on_load |
Boolean | Indicates whether the element will be set to auto focus within the view. Only one element can be set to true. Defaults to false. |
Optional |
Examples
Section titled “Examples”Checkboxes in a section
Section titled “Checkboxes in a section”
{ "blocks": [ { "type": "section", "block_id": "onboarding_northwind", "text": { "type": "mrkdwn", "text": "*Northwind Traders onboarding*\nTick each step as it's done." }, "accessory": { "type": "checkboxes", "action_id": "onboarding_steps", "initial_options": [ { "text": { "type": "plain_text", "text": "Kick-off call" }, "value": "kickoff" } ], "options": [ { "text": { "type": "plain_text", "text": "Kick-off call" }, "value": "kickoff" }, { "text": { "type": "plain_text", "text": "Import contacts" }, "value": "import_contacts" }, { "text": { "type": "plain_text", "text": "Connect email" }, "value": "connect_email", "description": { "type": "plain_text", "text": "Gmail or Outlook, for each sales rep" } } ] } } ]}Checkboxes in a form
Section titled “Checkboxes in a form”This example belongs in a modal view — the screenshot shows it in a modal.

{ "blocks": [ { "type": "input", "block_id": "modules", "label": { "type": "plain_text", "text": "Modules to enable" }, "element": { "type": "checkboxes", "action_id": "selected_modules", "options": [ { "text": { "type": "plain_text", "text": "Deals" }, "value": "deals" }, { "text": { "type": "plain_text", "text": "Invoices" }, "value": "invoices" }, { "text": { "type": "plain_text", "text": "Tickets" }, "value": "tickets" }, { "text": { "type": "plain_text", "text": "Appointments" }, "value": "appointments" } ] } } ]}