The Dialog module provides a mechanism for launching an add-on's modules as modal dialogs from within an add-on's iframe. A modal dialog displays information without requiring the user to leave the current page. The dialog is opened over the entire window, rather than within the iframe itself.
Styling your dialog to look like a standard Atlassian dialog
By default the dialog iframe is undecorated. It's up to the developer to style the dialog.

In order to maintain a consistent look and feel between the host application and the add-on, we encourage add-on developers to style their dialogs to match Atlassian's Design Guidelines for modal dialogs. To do that, you'll need to add the AUI styles to your dialog.
For more information, read about the Atlassian User Interface dialog component.
Methods
-
close(data) -
Closes the currently open dialog. Optionally pass data to listeners of the
dialog.closeevent. This will only close a dialog that has been opened by your add-on. You can register for close events using thedialog.closeevent and the events moduleParameters:
Name Type Description dataObject An object to be emitted on dialog close.
Example
AP.require('dialog', function(dialog){ dialog.close({foo: 'bar'}); }); -
create(options) -
Creates a dialog for a web-item, web-panel or page module key.
Parameters:
Name Type Description optionsDialogOptions configuration object of dialog options.
Example
AP.require('dialog', function(dialog){ dialog.create({ key: 'my-module-key', width: '500px', height: '200px' }); }); -
getButton() → {DialogButton} -
Returns the button that was requested (either cancel or submit)
Returns:
DialogButtonExample
AP.require('dialog', function(dialog){ dialog.getButton('submit'); }); -
onDialogMessage(String, Function) -
register callbacks responding to messages from the host dialog, such as "submit" or "cancel"
Parameters:
Name Type Description Stringbutton either "cancel" or "submit"
Functioncallback function
- This functionality is deprecated and may be removed in the future.