Pluxbox Logo

Confirmation dialog

Purpose

Give the user the option to select between two options and directly execute other logic based on the response.

Input

  • Show
    Displays the dialog box if any truthy value is received.

  • Title
    Takes any text. Witten with a bigger font in the dialog box.

  • Desctiption
    Takes any text. Written with normal-sized font in the dialog box.

  • Confirm button
    Takes any text. Written on the highlighted button. When the user clicks this button, it triggers the 'confirm' output. The default text is 'Confirm'

  • Cancel button
    Takes any text. Written on the unhighlighted button. When the user clicks this button, it triggers the 'cancel' output. The default text is 'Cancel'

Output

  • Confirm
    Sends 'true' when the user presses the 'Confirm' button.

  • Cancel
    Sends 'true' when the user presses the 'Cancel' button.

Example

This dialog will ask the user to confirm the deletion after they click the delete button.

graph LR
A([Click event]) --Show--> C(Confirmation dialog)
B([Are you sure?]) --Title--> C
D([You are about to delete this item]) --Description--> C
E([Delete]) --Confirm button--> C
C --Confirm--> G([My delete action])
C --Cancel--> G([Do nothing])