ModalDefinition
ModalDefinition
Content and dismissal configuration shared by authored and programmatic Modals.
Authoring guidance
Use when
Use as the reusable definition passed to the shared Modal renderer.
Properties
close
object
Optional dismissal configuration; every behavior defaults to enabled.
backdrop — boolean
Allows the backdrop to close the Modal.
control — boolean
Shows the visible close control.
escape — boolean
Allows Escape to close the Modal.
initialFocus
enum
Preferred initial focus destination; defaults to the close control, then content.
"close" | "content"
sections
Normal QP sections rendered as the Modal body.
title
string
Visible Modal heading and accessible dialog name.
Example
Required
{
"sections": [],
"title": "Example"
}
Full
{
"close": {
"backdrop": false,
"control": false,
"escape": false
},
"initialFocus": "close",
"sections": [
{
"appearance": "default",
"class": "example",
"elements": [
{
"cardClass": "example",
"cards": [
{
"title": "Getting Started",
"elements": [
{
"type": "paragraph",
"text": "Learn the basics of birding."
}
]
},
{
"title": "Field Skills",
"elements": [
{
"type": "paragraph",
"text": "Practice identifying birds outdoors."
}
]
}
],
"class": "example",
"columns": 2,
"type": "card-list"
}
],
"id": "example",
"subtitle": "example",
"title": "Example",
"titleSrOnly": false,
"type": "section",
"width": "default"
}
],
"title": "Example"
}
examples are generated from the schema.