In your project, the source code for your dashboard plugins is located in the src/extensions/
folder.
Each plugin is defined in its own subdirectory that contains the following files:
extension.json
: Defines the plugin configuration.plugin.tsx
: Defines the plugin content.The extension.json
file contains the dashboard plugin extension's configuration details. This file defines which dashboard page hosts your plugin. The structure is as follows:
Field | Type | Description |
---|---|---|
compId | string | ID of the plugin you created using the CLI. This ID is auto-generated by Wix. |
compType | string | Always BACK_OFFICE_EXTENSION_WIDGET for dashboard plugins. |
compName | string | Name of the plugin. |
compData.backOfficeExtensionWidget.hostingPlatform | string | Always BUSINESS_MANAGER . |
compData.backOfficeExtensionWidget.extends | string | Slot ID of the dashboard page hosting the plugin. |
compData.backOfficeExtensionWidget.title | string | The plugin's title. |
The page.tsx
file contains the dashboard plugin content.
The content is defined in a React component that renders when the page is active. Below is an example of how your plugin.tsx
file will look upon creation:
In the dashboard plugin component, you can: