To make a general component which can be used across all components Comment below and let me know if you have any issues/query. There are various ways to create a it. Creating a Modal Popup Lightning Component . Method-1: Create Modal Box within a single component. Any idea why?Also, if I call this component from a quick action it works but it throws an error after I close it.As this is a beta feature it is not supported in the Standalone application. What is modal popup? Modals/pop-ups can be created easily with few lines of code. Create the LightningModal lightning component. This modal might sometime take a while to open but its advantage is its re-usable as it can be used in another component too.Did you find the dynamic component creation code tricky ?? Use below code This is the body of this lightning modal. Modals/Popup Box are used to display content in a layer above the app. Search Submit your search query.
Modal Content (ModalContent.cmp) – This component contains all the content to show in the Modal as content.
Check out our another alternate method below.Comment below and let me know if you have any issues/query. To make a RE-USABLE lightning modal, see the link below.