Modal

Modal

Documentation

An addressable dialog rendered outside normal document flow. Any same-document Link whose fragment resolves to this Modal's ID is enhanced by the QP runtime to open it as a dialog.

Kind

Rendered Content

Required fields

id, sections, title, type

Style Guide

Used by

Authoring guidance

Recommended

Modal IDs should use the qpm- prefix to reduce collisions with other document IDs and make Modal fragment targets recognizable. The prefix is an authoring convention and is not required by the runtime.

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.

*

id

string

Stable fragment target used to address this 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.

*

type

string

Identifies the Element type represented by this object.

"modal"

Example

Required

{ "id": "qpm-help", "sections": [], "title": "Help", "type": "modal" }

Full

{ "close": { "backdrop": false, "control": false, "escape": false }, "id": "qpm-help", "initialFocus": "close", "sections": [ { "id": "qpm-help-content", "title": "Help details", "titleSrOnly": true, "appearance": "transparent", "elements": [ { "type": "paragraph", "text": "Use any normal QP content inside a Modal." } ] } ], "title": "Help", "type": "modal" }

examples are generated from the schema.