# Dialog

## Basic Example

{% tabs %}
{% tab title="Input" %}

<div align="center"><img src="https://1589143646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3AlXnP5kHENnvBXdKq%2F-MG047Vzd5SSJUaRhvbg%2F-MG05MiCMzUHwb9gntai%2FScreenshot_1598819860.png?alt=media&#x26;token=22ad4ebd-b9c8-4871-aa46-000db98e0bc2" alt="Input"></div>
{% endtab %}

{% tab title="Output " %}
![Output](https://1589143646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3AlXnP5kHENnvBXdKq%2F-MG047Vzd5SSJUaRhvbg%2F-MG05Qs3ENYX8MaiSy23%2FScreenshot_1598819945.png?alt=media\&token=7643f0e0-e789-4f8a-8291-bfe298c7c124)

## Blocks

#### Set title:

![](https://1589143646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3AlXnP5kHENnvBXdKq%2F-MG05t13z02XuZ7OOwR2%2F-MG08QnS8IaW_lLlielY%2Fimage.png?alt=media\&token=b323653a-202f-4dc2-a3fd-bf55114f8902)

Sets the title for the specified dialog.

#### Set message:

Sets the message for the specified dialog.

#### OK Button clicked:

Runs the blocks inside when specified name of the OK button is clicked.
{% endtab %}
{% endtabs %}

## Blocks

#### Set title

<div align="left"><img src="https://1589143646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3AlXnP5kHENnvBXdKq%2F-MG08dit9pjMybA1qJXV%2F-MG08p8asuyaFxozR0xH%2Fimage.png?alt=media&#x26;token=6045ddee-f36e-4f65-9a05-d892cc02efa5" alt="set title"></div>

Sets the specified title for the specified dialog.

#### Set message

<div align="left"><img src="https://1589143646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3AlXnP5kHENnvBXdKq%2F-MG6-3gqTg8QqxwXwhSy%2F-MG9Aw-e872-lN19BoKx%2FDialog%20set%20message.png?alt=media&#x26;token=a59a9282-c22f-4bfb-9d4b-eac1be727913" alt="set message"></div>

Sets the specified message for the specified dialog.

#### OK Button Clicked

<div align="left"><img src="https://1589143646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3AlXnP5kHENnvBXdKq%2F-MG6-3gqTg8QqxwXwhSy%2F-MG9AzIkfZJo8-u5juVi%2FDialog%20OK%20button%20clicked.png?alt=media&#x26;token=c03fa3b0-dc15-421d-a70f-e1381de16fba" alt="OK Button Clicked"></div>

When the specified button that is in the OK position is clicked, run the blocks inside for the specified dialog.

#### Cancle Button Clicked

<div align="left"><img src="https://1589143646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3AlXnP5kHENnvBXdKq%2F-MG6-3gqTg8QqxwXwhSy%2F-MG9B2UUnUiyfJtXVRhd%2FDialog%20cancel%20button%20clicked.png?alt=media&#x26;token=2925c577-ccf5-4bd9-8a71-db04aa46353a" alt="Cancle Button Clicked"></div>

When the specified button that is in the Cancel position is clicked, run the blocks inside for the specified dialog.

#### Neutral Button Clicked

<div align="left"><img src="https://1589143646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3AlXnP5kHENnvBXdKq%2F-MG6-3gqTg8QqxwXwhSy%2F-MG9B6QORvU3JazCcgU8%2FNeutral%20button%20clicked.png?alt=media&#x26;token=02ee7357-236d-4376-8e20-e827732ab3ce" alt="Neutral Button Clicked"></div>

When the specified button that is in the Neutral position is clicked, run the blocks inside for the specified dialog.

#### Dialog show

<div align="left"><img src="https://1589143646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3AlXnP5kHENnvBXdKq%2F-MG9BBv4oLR3axYEOlms%2F-MG9BFAHzk1VSHOgr63B%2FDialog%20show.png?alt=media&#x26;token=ca8fe29e-00b5-4054-81c1-a2717c5c8d26" alt="Dialog show"></div>

Shows the specified dialog.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sketchwaredocs.gitbook.io/home/components/dialog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
