> 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 ## Resource: closeModal() ## Article: closeModal() ## Article Link: https://dev.wix.com/docs/sdk/host-modules/dashboard/close-modal.md ## Article Content: # closeModal() Closes the currently open modal. > **Note:** This method can only be used in the code for a [dashboard modal extension](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/dashboard-extensions/dashboard-modals/about-dashboard-modals.md) and therefore can't be used when when [developing sites](https://dev.wix.com/docs/develop-websites.md) or [building apps with Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/about-wix-blocks.md). ![Close Modal](https://wixmp-833713b177cebf373f611808.wixmp.com/images/0b65ed1a93751c3e156ea3c944ca3b78.gif) ## Method Declaration ```typescript (closeData?: Serializable) => void ``` ## Parameters | Name | Type | Description | |-------------|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `closeData` | `Serializable` | Optional. Data to pass to the modal's opener. This data is returned by [openModal](https://dev.wix.com/docs/sdk/host-modules/dashboard/open-modal.md) once the modal is closed. It must be Serializable data, which means it can be cloned using the [structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). For example, you cannot pass function callbacks in this parameter. | ## Returns `void` ## Examples > **Note:** To call this method in [self-hosted apps](https://dev.wix.com/docs/sdk/articles/get-started/about-self-hosted-apps.md), you need to create a [client](https://dev.wix.com/docs/sdk/articles/set-up-a-client/about-the-wix-client.md). See the [setup](https://dev.wix.com/docs/sdk/host-modules/dashboard/introduction.md) guide for more details. ### Close a modal ```typescript import { dashboard } from '@wix/dashboard'; dashboard.closeModal({ message: 'The modal is closed!' }); ```