Skip to content
Block Kit for React
Esc
↑↓navigate↵open⌘Jpreview
On this page

Radio buttons

A group of options where exactly one can be selected at a time.

radio_buttons renders a stack of options where picking one clears any other. Use it when someone must choose a single option from a short list: an actions row or section accessory for a live choice, or an input block to collect a value in a modal or Home tab.

Your AppAPP
onActionInteract with the preview.

Fields

PropType
typestring

Always `radio_buttons`.

Typestring
optionsOption[]

The options, in order. Slack allows a maximum of 10.

TypeOption[]
initial_option?Option

The option that starts selected. Must match one of `options` by `value`.

TypeOption
action_id?string

Identifies this action in the interaction payload. Must be unique within the block. Maximum length is 255 characters.

Typestring
confirm?ConfirmationDialog

Shows a confirmation dialog before a new selection is dispatched. See Confirmation dialogs.

TypeConfirmationDialog
focus_on_load?boolean

Focuses the first radio button when the surface loads. Slack ignores this in messages and allows it on only one element per view.

Typeboolean
Defaultfalse

Each option is an Option object:

PropType
textPlainTextElement | MrkdwnElement

The option's label. Maximum length is 75 characters.

TypePlainTextElement | MrkdwnElement
value?string

Sent back in the interaction payload when this option is selected. Maximum length is 75 characters.

Typestring
description?PlainTextElement

A line of descriptive text shown below the label. Maximum length is 75 characters.

TypePlainTextElement

Examples

With an initial option selected

The preview above starts with “Medium” already selected, using initial_option.

Without an initial option

Your AppAPP
onActionInteract with the preview.

Nothing starts selected, and onAction doesn’t fire until the first pick.

With option descriptions

Your AppAPP
onActionInteract with the preview.

A description adds a second, muted line under the option’s label.

As a section accessory

Your AppAPP
Release channel
Pick which builds you receive.
onActionInteract with the preview.

As a section accessory, the group stacks below the section’s text instead of sitting beside it.

In an input block

Escalation

Severity

With a confirmation dialog

Your AppAPP
onActionInteract with the preview.

The dialog appears before any new selection is applied. Picking the option that’s already selected does nothing and never asks. See Confirmation dialogs.

Interactivity

Selecting an option (after any confirm dialog is accepted) calls onAction with the chosen option under selected_option:

{
  "type": "radio_buttons",
  "action_id": "level",
  "block_id": "priority",
  "action_ts": "1706000000.000100",
  "selected_option": { "text": { "type": "plain_text", "text": "High" }, "value": "high" }
}

Reading the value

Radio buttons write to state.values on mount when initial_option is set (reporting it exactly like Slack does when the surface loads), and again on every selection:

{
  "priority": {
    "level": {
      "type": "radio_buttons",
      "selected_option": { "text": { "type": "plain_text", "text": "Medium" }, "value": "medium" }
    }
  }
}

Without initial_option, nothing is written to state.values until the first pick. Unlike checkboxes, there’s no empty state to report.

Was this page helpful?