> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: openAppLightbox(lightboxId: string, data: object) # Method package: wixApplication # Method menu location: wixApplication --> openAppLightbox # Method Link: https://dev.wix.com/docs/velo/velo-only-apis/wix-application/open-app-lightbox.md # Method Description: Opens a popup that was added to a site by the Blocks app during the app installation process and optionally passes it data. > **Note:** The terms popup and lightbox refer to the same element. While the editor and dashboard now refer to it as a [popup](https://support.wix.com/en/article/studio-editor-using-popups), the API methods continue to use the term lightbox for backward compatibility. The documentation uses both terms accordingly. The `openAppLightbox()` function returns a Promise that resolves to an object with data from the popup, when the popup is closed. Use it when a widget is installed as a popup. Learn more about [app and widget installation settings](https://support.wix.com/en/article/wix-blocks-app-and-widget-installation-settings). Note that to pass data back to the page that opened the popup, you must close the popup programmatically using the `close()` function. If the popup is closed by the site visitor clicking the 'X' icon, close button, or popup overlay, data will not be passed back the the page that opened the popup. Therefore, if you want to make sure data is passed back to the page that opened the popup, [disable all of the methods mentioned above](https://support.wix.com/en/article/wix-editor-adding-and-setting-up-a-lightbox#step-3-adjust-the-popup-settings) and create your own method for closing the popup programmatically. For example, you can add a button with an `onClick` event handler that calls the `close()` function. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Open a popup ```javascript import wixApplication from 'wix-application'; // ... wixApplication.openAppLightbox("lightboxId"); ``` ## Open a popup and send it data ```javascript import wixApplication from 'wix-application'; // ... const dataObj = {title: "Widget Title"}; wixApplication.openAppLightbox("lightboxId", dataObj); ``` ## Open a popup and receive data when it closes ```javascript import wixApplication from 'wix-application'; // ... wixApplication.openAppLightbox("lightboxId") .then((data) => { let receivedData = data; // When the popup is closed, it returns this data }); ``` ## Open a popup, send it data and receive data back when it closes ```javascript import wixApplication from 'wix-application'; // ... const dataObj = {title: "My Title"}; wixApplication.openAppLightbox("lightboxId", dataObj) .then((data) => { let receivedData = data; // When the popup is closed, it returns this data. }); ``` ---