I have 2 lightning component. One component contains a button and another component needs to be opened in a popup on click of the button in first component.I don't have the code to open the second component in a popup.Need your help on this

  • The SLDS Popovers classes such as slds-popover slds-popover--panel will provide the look and then adding Visibility classes from the JavaScript controller can do the show/hide.
    – Keith C
    Commented Feb 24, 2017 at 8:53
  • 1
    Have you checked existing questions/answers before posting this question? There is a very similar question to your requirement. Kindly check that out first and then let us know if you are still stuck.
    – Mahmood
    Commented Feb 24, 2017 at 10:45

1 Answer 1

BulkReply: function(component, event, helper){

 var modalBody;

 var lstEmails=component.get('v.lstEmails');

 console.log('lstEmails---' + lstEmails);

 $A.createComponent("c:EmailComponent", {lstEmails:lstEmails},

 function(content, status) {

   if (status === "SUCCESS") {

  modalBody = content;


    header: "Bulk Reply",

    body: modalBody, 

     showCloseButton: true,

     closeCallback: function() {



also use lightning:overlaylibrary in component in which button are there

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .