Prompt widgets in Magento2

The prompt widget source is


It also enlarge the magento model widgets

The design pattern for the model pop-up windows in the administration is explained in the Magento admin Pattern Library, Slide-Out Panel, Modal Window, Overlays Topics.

Initialize the prompt widgets

The prompt widgets can be initialized with or without binding to a certain component.

Initialization on an element


    title: 'Prompt title',

    actions: {

        confirm: function(){}, //callback on 'Ok' button click

        cancel: function(){}, //callback on 'Cancel' button click

        always: function(){}



Standalone initialization



], function(prompt) { // Variable that represents the `prompt` function


        title: 'Some title',

        content: 'Some content',

        actions: {

            confirm: function(){},

            cancel: function(){},

            always: function(){}





 There are some options in prompt widgets which you can use


  • Widgets call back
  • Object type

Auto open

  • automatically open prompt widgets when the widgets is initialized
  • Boolean type

Clickable overlay

  • Close the prompt widgets when the user click on the overlay
  • Boolean type


  • Prompt widgets content
  • String type


  • The title of the prompt widgets
  • String type


This prompt widgets executes the following event:

  • Conform
  • Cancel
  • Always

These are some of the prompt widgets in Magento2. I hope this information helps you to prompt widgets in Magento2.

Last Update: April 6, 2018  

February 5, 2018   685   Nandini Ramachandran    Magento2    
Total 4 Votes:

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Leave a Reply

Your email address will not be published. Required fields are marked *