When you add a dashboard modal extension, the generated files land under src/extensions/dashboard/modals/<modal-folder>/ and the extension is registered in your project's extensions.ts.
This file set is the same whether you add the modal in a Studio Two site project or in a Wix CLI project.
| File | What it's for |
|---|---|
<modal-folder>.extension.ts | The configuration file for the modal ID, title, size, and component path. |
<modal-folder>.config.ts | The shared config for title, width, and height. |
<modal-folder>.tsx | The modal content: the React component that renders when the modal is open. |
The <modal-folder>.extension.ts file declares the modal with extensions.dashboardModal().
Import extensions from the package your project uses:
Example:
| Field | Type | Description |
|---|---|---|
id | string | Modal ID as a GUID. Used to register the modal, and as the modalId you pass to openModal(). It must be unique across all dashboard modals in the project. When the modal belongs to an app, this ID is also how the modal is registered in the app dashboard. |
title | string | The modal title. Used to refer to the modal in the project dashboard. |
width | number | Initial width of the modal while loading. |
height | number | Initial height of the modal while loading. |
component | string | Path to the modal content component. |
The <modal-folder>.config.ts file holds title, width, and height together. The configuration file and the React component both import it.
Change these values when you want a different title or a different size. Keep the modal ID stable once other code depends on it. Dashboard pages and menu plugins use this value as the target modal ID.
The <modal-folder>.tsx file exports a React component that renders when the modal is open.
A generated modal typically wraps its content in WixDesignSystemProvider and CustomModalLayout. Inside a dashboard modal component you can use:
To receive custom data passed by openModal() or by a menu plugin that opens the modal, call observeState().
Last updated: 2 November 2026