Dashboard Modal Extension Files and Code

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.

Copy
FileWhat it's for
<modal-folder>.extension.tsThe configuration file for the modal ID, title, size, and component path.
<modal-folder>.config.tsThe shared config for title, width, and height.
<modal-folder>.tsxThe modal content: the React component that renders when the modal is open.

Configuration file

The <modal-folder>.extension.ts file declares the modal with extensions.dashboardModal().

Import extensions from the package your project uses:

Copy
Copy
Copy

Example:

Copy

Configuration fields

FieldTypeDescription
idstringModal 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.
titlestringThe modal title. Used to refer to the modal in the project dashboard.
widthnumberInitial width of the modal while loading.
heightnumberInitial height of the modal while loading.
componentstringPath to the modal content component.

Shared config

The <modal-folder>.config.ts file holds title, width, and height together. The configuration file and the React component both import it.

Copy

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:

  • The Dashboard SDK to close the modal, open other modals, navigate between dashboard locations, and show toasts.
  • The Wix Design System to display content using the same React components Wix uses to build its own dashboard pages.
  • The Wix JavaScript SDK to access and manage Wix data.

To receive custom data passed by openModal() or by a menu plugin that opens the modal, call observeState().

See also

Last updated: 2 November 2026

Did this help?