> For the complete documentation index, see [llms.txt](https://brady-xyz.gitbook.io/maclib-ui-library/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://brady-xyz.gitbook.io/maclib-ui-library/getting-started/loading-maclib/creating-a-window/prompting-a-dialog.md).

# Prompting a dialog

<figure><img src="https://2943218207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhRtWRcExHV8IBJHoV9bx%2Fuploads%2F142AClC7sOQoMgm4zAZP%2Fimage.png?alt=media&amp;token=9b479aea-1a3b-4c0c-90c8-7012732c5080" alt=""><figcaption></figcaption></figure>

```lua
Window:Dialog({
    Title <string>
    Description <string>
    Buttons <table: <...table: Name, Callback>>
})
```

Functions

```lua
:UpdateTitle(<string>)
:UpdateDescription(<string>)
:Cancel()
```

Example

```lua
Window:Dialog({
    Title = "Kuzu Hub",
    Description = "Are you sure? This is not reversable and can get you banned in some up to date servers.",
    Buttons = {
        {
            Name = "Confirm",
            Callback = function()
            	print("Confirmed!")
            end,
        },
        {
            Name = "Cancel"
        }
    }
})
```
