Skip to main content
Modal components provide cross-platform dialog forms for collecting user input. They automatically convert to platform-specific formats.

Opening Modals

Modals are opened in response to user actions:

Handling Submissions

Root modal container.
string
required
Unique identifier for routing submission events
string
required
Modal title displayed in header
ModalChild[]
Form input elements
string
Custom label for submit button (default: “Submit”)
string
Custom label for close/cancel button (default: “Cancel”)
boolean
If true, triggers onModalClose handler when user closes without submitting
string
Arbitrary string passed through modal lifecycle (e.g., JSON context)

ModalElement Type

TextInput

Single or multi-line text input field.
string
required
Unique input ID (used to access value in submission)
string
required
Input label displayed above field
string
Placeholder text shown when empty
string
Pre-filled value
boolean
If true, renders as textarea
number
Maximum character limit
boolean
If true, field is not required for submission
Example:

Select

Dropdown select menu.
string
required
Unique input ID
string
required
Select label
SelectOptionElement[]
required
Available options
string
Placeholder text shown when no option selected
string
Pre-selected option value
boolean
If true, field is not required for submission
Example:

RadioSelect

Radio button group.
string
required
Unique input ID
string
required
Radio group label
SelectOptionElement[]
required
Available options
string
Pre-selected option value
boolean
If true, field is not required for submission
Example:

SelectOption

Option for Select or RadioSelect.
string
required
Display text
string
required
Value returned on submission
string
Optional description text

ModalSubmitEvent

Event fired when user submits the modal.
Handler:

ModalCloseEvent

Event fired when user closes modal without submitting (requires notifyOnClose: true).
Handler:
Return these from onModalSubmit handlers to control modal behavior:

Close Modal

Show Validation Errors

Update Modal Contents

Push New Modal (Stack)

Complete Example

JSX Support

Modals also support JSX syntax: