# Pop-up Window >![](../../public_sys-resources/icon-note.gif) **NOTE:** >The initial APIs of this module are supported since API version 4. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Module to Import ``` import prompt from '@system.prompt'; ``` ## Required Permissions None ## prompt.showToast showToast\(Object\): void Displays the toast dialog box. - Parameter
Duration of the toast dialog box. The default value is 1500. The recommended value ranges from 1500 ms to 10000 ms. |
|||
Distance between the dialog border and the bottom of the screen. |
Array of buttons in the dialog box. The array structure is {text:'button', color: '#666666'}. One to three buttons are supported. The first button is of the positiveButton type, the second is of the negativeButton type, and the third is of the neutralButton type. |
|||
Called when the dialog box is displayed. For the return value, see return values of the success callback. |
|||
Array of buttons in the dialog box. The array structure is {text:'button', color: '#666666'}. One to six buttons are supported. If there are more than six buttons, the pop-up window will not be displayed. |
|||
(data: TapIndex) => void |
|||
Index of the selected button in the buttons array, starting from 0. |