Skip to main content

Modal Forms and Dialogs

Modals allow you to collect structured input from users through form dialogs. They can be opened from button clicks, slash commands, or other interactions.

Opening Modals

From Button Actions

From Slash Commands

Form Input Elements

TextInput

Single or multi-line text input.
Example:

Select

Dropdown selection (single choice).
Example:
Function API:

RadioSelect

Radio button group (single choice).
Example:

Handling Modal Submissions

Register a handler for the modal’s callbackId:

Validation Errors

Show field-specific errors without closing the modal:

Update Modal

Update the modal content (for multi-step flows):

Push New Modal

Stack a new modal on top (Slack only):

Close Modal

Explicitly close the modal:

Private Metadata

Pass context through the modal lifecycle:

Handling Modal Close

Listen for modal dismissal (requires notifyOnClose: true):

Complete Example

Full workflow with validation and confirmation:

Platform Support

  • Slack: Full support (update, push, errors)
  • Microsoft Teams: Basic support (submit/close only)
  • Google Chat: Card-based dialogs

Next Steps

Actions

Learn how to trigger modals from buttons

Slash Commands

Open modals from slash commands