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.
Fields
typestring
Always `radio_buttons`.
stringoptionsOption[]
The options, in order. Slack allows a maximum of 10.
Option[]initial_option?Option
The option that starts selected. Must match one of `options` by `value`.
Optionaction_id?string
Identifies this action in the interaction payload. Must be unique within the block. Maximum length is 255 characters.
stringconfirm?ConfirmationDialog
Shows a confirmation dialog before a new selection is dispatched. See Confirmation dialogs.
ConfirmationDialogfocus_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.
booleanfalseEach option is an Option object:
textPlainTextElement | MrkdwnElement
The option's label. Maximum length is 75 characters.
PlainTextElement | MrkdwnElementvalue?string
Sent back in the interaction payload when this option is selected. Maximum length is 75 characters.
stringdescription?PlainTextElement
A line of descriptive text shown below the label. Maximum length is 75 characters.
PlainTextElementExamples
With an initial option selected
The preview above starts with “Medium” already selected, using initial_option.
Without an initial option
Nothing starts selected, and onAction doesn’t fire until the first pick.
With option descriptions
A description adds a second, muted line under the option’s label.
As a section accessory
As a section accessory, the group stacks below the section’s text instead of sitting beside it.
In an input block
Escalation
With a confirmation dialog
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.
Related
Checkboxes
The multi-select equivalent: any number of options can be checked at once.
Select menus
Static, external, users, conversations and channels selects, single or multi.
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.