Alert Dialog
Display confirmation dialogs with accept/cancel actions. Supports markdown in the content field.
Exports
| Export | Parameters | Returns |
|---|---|---|
AlertDialog | (data) | 'confirm' or 'cancel' |
CloseAlertDialog | () | — |
AlertDialog Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
header | string | Yes | Dialog title |
content | string | Yes | Dialog message — supports markdown |
cancel | boolean | No | Show cancel button (default: false) |
size | string | No | Modal size: 'xs', 'sm', 'md', 'lg', 'xl' |
labels.cancel | string | No | Custom cancel button text |
labels.confirm | string | No | Custom confirm button text |
Usage
Confirmation Dialog
local result = exports['flux-ui-pack']:AlertDialog({
header = 'Confirm Action',
content = 'Are you sure you want to proceed?',
cancel = true
})
if result == 'confirm' then
print('User confirmed')
else
print('User cancelled')
endCustom Button Labels
local result = exports['flux-ui-pack']:AlertDialog({
header = 'Delete Vehicle',
content = 'This action **cannot** be undone.',
cancel = true,
labels = { cancel = 'Keep', confirm = 'Delete' }
})Information Dialog
exports['flux-ui-pack']:AlertDialog({
header = 'Notice',
content = 'Your vehicle has been impounded.'
})Close Dialog
exports['flux-ui-pack']:CloseAlertDialog()Last updated on