When you generate a dashboard plugin extension, the CLI adds the following files to your project:
<your-plugin-name>.extension.ts: Builds the plugin.<your-plugin-name>.tsx: Defines the plugin content.The <your-plugin-name>.extension.ts file contains the dashboard plugin builder configuration. This file defines which dashboard page hosts your plugin.
The plugin builder is defined using the following schema, shown here as a TypeScript type:
Here's an example builder definition:
The following fields can be used in the configuration object:
| Field | Type | Description |
|---|---|---|
id | string | Plugin ID as a (GUID). The ID is automatically generated and must be unique across all extensions in the project. |
title | string | The plugin title. The title is used to refer to the plugin in the project dashboard. |
extends | string | Slot ID of the dashboard page hosting the plugin. |
component | string | Path to the plugin content component. |
The <your-plugin-name>.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 your-plugin-name.tsx file will look upon creation:
In the dashboard plugin component, you can use: