> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/reference/apps/ui/views/dialog.md).

# Dialog

A dialog is a customizable [view](https://docs.appfarm.io/reference/apps/ui/views.md) that is placed over a standard view and often used for user confirmation or data entry. Dialogs can be opened and closed using the Open dialog and Close dialog action nodes respectively.

{% hint style="info" %}
Showroom: [dialog example](https://showroom.appfarm.app/ui-components/dialog), with its setup in Appfarm Create ([register](https://showroom.appfarm.app/sign-up) for access).
{% endhint %}

## General properties

<table><thead><tr><th width="240">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Dialog type</strong></td><td><p>The way the dialog should be displayed. The options are:</p><ul><li><code>Modal</code>: Display a modal window in the middle of the screen. The rest of the app is covered by a backdrop and interactions outside of the dialog are blocked.</li><li><code>Fullscreen</code>: Fill the entire screen. The height and width properties of the dialog are ignored. Usually only recommended for Small and Extra Small devices.</li><li><code>Responsive</code>: Adapt according to the client screen size. Modal will be applied by Large and Medium devices, while Fullscreen will be applied on Small and Extra Small devices.</li></ul></td></tr><tr><td><strong>Dismissible</strong></td><td>When selected the user can click on the backdrop outside of the dialog, or press the <code>Esc</code> key on their keyboard, to close the dialog. Not available when <strong>Dialog type</strong> is <code>Fullscreen</code>.</td></tr></tbody></table>

## App bar

App bar properties for dialogs are the same as for [views](https://docs.appfarm.io/reference/apps/ui/views.md#app-bar).

## Event handlers

<table><thead><tr><th width="244">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>On Dialog Open</strong></td><td>Triggered when the dialog is opened, before it is shown. The dialog is not visible until this action has finished, so a slow action here delays the dialog. Use <strong>On Dialog Opened</strong> for work that can run while the dialog is visible.</td></tr><tr><td><strong>On Dialog Opened</strong></td><td>Triggered after the dialog has opened and is visible.</td></tr><tr><td><strong>On Dialog Close</strong></td><td>Triggered after the dialog has been closed and is no longer visible, whatever closed it: a Close dialog action node, or, when <strong>Dismissible</strong> is selected, a click on the backdrop or the <code>Esc</code> key.</td></tr><tr><td><strong>On backdrop click</strong></td><td><em>Available when Dismissible is selected, so not for Fullscreen dialogs</em><br>Triggered when the user clicks on the backdrop outside of the dialog. This is useful when a user clicks the backdrop to close instead of using a cancel/close button. This will also be triggered when the user presses the <code>Esc</code> key on their keyboard.<br><br>If both <strong>On Dialog Close</strong> and <strong>On backdrop click</strong> are configured, <strong>On backdrop click</strong> will be triggered first.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/reference/apps/ui/views/dialog.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
