A dialog is a modal panel that appears centered over the window. While open, it captures all input — the user must interact with its buttons before they can use the rest of the UI again. Dialogs are created by callingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Footagesus/WindUI/llms.txt
Use this file to discover all available pages before exploring further.
Window:Dialog(Config).
Basic usage
Parameters
Heading text displayed at the top of the dialog.
Body text shown below the title. Supports RichText markup.
Icon name (e.g.
"alert-triangle") shown to the left of the title. Optional.When
true, the icon tint follows the current theme’s text color.Width of the dialog panel in pixels. Clamped between
180 and 400.An ordered array of button configs. Buttons are laid out horizontally; if they overflow they stack vertically.Each button supports:
| Field | Type | Description |
|---|---|---|
Title | string | Button label |
Icon | string | Optional icon name |
Variant | string | Visual style: "Primary", "Secondary", or "Tertiary" |
Callback | function | Called when the button is clicked |
Button variants
Primary
Primary
Use for the main, affirmative action (e.g. Confirm, Save, Close Window). Rendered with a filled, prominent background.
Secondary
Secondary
Use for the dismissive or neutral action (e.g. Cancel, Go back). Rendered with a subdued background.
Tertiary
Tertiary
Use for optional or low-emphasis actions. Rendered with minimal visual weight.
How dialogs work
Create the window
A
Window must exist before you call :Dialog(). The dialog is positioned and clipped inside the window’s main frame.Call Window:Dialog(Config)
WindUI builds the dialog, attaches a dimmed full-screen overlay over the window, and calls
Dialog:Open() automatically.WindUI itself uses
Window:Dialog() for the built-in Close Window confirmation. You can see this pattern in practice by clicking the window’s close button.Close Window example (built-in pattern)
Return value
Window:Dialog() returns the dialog object. You can call Dialog:Close() on it to dismiss the dialog programmatically without a button click.