This guide explains how to add a dashboard modal extension to your new Wix CLI project as part of migrating an app from the legacy Wix CLI.
| Legacy | New |
|---|---|
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 |
To move existing files into the new project:
src/extensions/dashboard/modals/<name>/.modal.tsx from the legacy project's src/dashboard/modals/<name>/ folder into the new project's src/extensions/dashboard/modals/<name>/ folder, and rename it to <name>.tsx..tsx file if needed, including imports of backend code.Don't copy the old modal.json file. It is replaced by a new .extension.ts file.
In src/extensions/dashboard/modals/<name>/, create <name>.extension.ts:
| Field | Source | Required |
|---|---|---|
id | id from modal.json | Yes. Must match legacy value to preserve the extension. |
title | title from modal.json | Yes |
width | width from modal.json | No |
height | height from modal.json | No |
component | Path to the .tsx file, relative to src/ | Yes |
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 and add it with .use():
Return to the Test, build, and release step in the main migration guide.
Last updated: 29 June 2026