Add a dashboard modal extension to your new Wix CLI project as part of migrating an app from the legacy Wix CLI.
| Legacy path | New path |
|---|---|
src/dashboard/modals/<name>/modal.json | src/extensions/dashboard/modals/<name>/<name>.extension.ts |
src/dashboard/modals/<name>/modal.tsx | src/extensions/dashboard/modals/<name>/<name>.tsx |
Note: <name> is your extension's folder name in the legacy project. The new folder and files use the same name.
In the new project:
src/extensions/dashboard/modals/<name>/.src/dashboard/modals/<name>/ folder, copy modal.tsx into the new folder, and rename it to <name>.tsx.Don't copy the legacy modal.json file. You recreate its values in <name>.extension.ts.
In <name>.tsx:
modal.json with the values themselves. The legacy CLI generates the extension with import { width, height, title } from './modal.json', and your code may also import id. The JSON file isn't copied to the new project. Set the values directly in the component, or pass them as props.src/dashboard/, copy that code into the new project at the same path, and update the relative imports from the component's new location. See Add the extension to the new project in the main migration guide.In the new project:
In src/extensions/dashboard/modals/<name>/, create <name>.extension.ts.
Add the following code, and set each field to the value the table below specifies:
| Field | Source in legacy project | What to specify |
|---|---|---|
id | id in modal.json | Copy source as is |
title | title in modal.json | Copy source as is |
component | None | Path to <name>.tsx, relative to src/ |
Add any of the following fields that apply, inside the same object:
| Field | Source in legacy project | What to specify | Condition |
|---|---|---|---|
width | width in modal.json | Copy source as is | Only if your legacy modal.json sets it |
height | height in modal.json | Copy source as is | Only if your legacy modal.json sets it |
Important:
The id must match the value from the legacy modal.json. Otherwise, the new entry is treated as a separate extension instead of a continuation of the legacy one.
In the new project, in src/extensions.ts:
Import the extension:
Add a .use() call for it to the app() chain, on its own line:
Return to Install the extension's dependencies in the main migration guide.
Last updated: 10 November 2026