<dialog>
A dialog with a title, a message, and confirm and cancel buttons that run statements.
<dialog title="Cancel this trip?"
confirm-label="Cancel trip"
cancel-label="Keep it">
<text>Your booking in Lisbon will be released. This can't be undone.</text>
</dialog>
Attributes
| Name | What it does | Default |
|---|---|---|
cancel-label |
Show a cancel button with this label. string |
|
confirm-labelalso action-label |
The confirm button's label. string |
OK |
icon |
An icon above the title (icon name). string |
|
title |
Dialog title string |
Dialog |
Commands
| Name | What it does |
|---|---|
dismiss |
Close it. |
show |
Open it. |
Events
| Name | What it does |
|---|---|
action-cancel |
Statements to run when the cancel button is pressed. |
action-confirm |
Statements to run when the confirm button is pressed (the dialog closes first), e.g. "#db.trip.delete:$id". @on.confirm is the same. |
Readings
| Name | What it does |
|---|---|
open |
Whether it is showing. |
Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.