Interface: FrontendPlugin
Defined in: types/frontend.ts:66
Frontend plugin interface for UI contributions.
Frontend plugins register UI components that the core renders in predefined extension points. Each registration returns a Disposable for cleanup.
Example
class MyFrontendPlugin extends BaseFrontendPlugin {
readonly id = 'my-ui';
readonly displayName = 'My UI Plugin';
async activate(context: FrontendPluginContext) {
context.subscriptions.push(
context.registerSettingsSection({
categoryId: 'integrations',
sectionId: 'my-settings',
label: 'My Settings',
icon: MyIcon,
component: MySettingsPanel,
})
);
}
}
Extends
Properties
activationEvents
readonlyactivationEvents:PluginActivation[]
Defined in: types/frontend.ts:74
Events that trigger this plugin's activation. Frontend plugins typically use 'onStartup' or 'onSettingsOpen'.
displayName
readonlydisplayName:string
Defined in: types/plugin.ts:24
Human-readable display name
Inherited from
id
readonlyid:string
Defined in: types/plugin.ts:18
Unique plugin identifier matching the manifest id field
Inherited from
type
readonlytype:"frontend"|"both"
Defined in: types/frontend.ts:68
Must be 'frontend' or 'both'
Overrides
Methods
activate()
activate(
context):Promise<void>
Defined in: types/frontend.ts:81
Called when the plugin is activated with a frontend context. Use the context's registerXxx methods to contribute UI elements. Push returned Disposables to context.subscriptions for automatic cleanup.
Parameters
| Parameter | Type |
|---|---|
context | FrontendPluginContext |
Returns
Promise<void>
Overrides
deactivate()
deactivate():
Promise<void>
Defined in: types/frontend.ts:87
Called when the plugin is deactivated. Clean up any resources not tracked via context.subscriptions.
Returns
Promise<void>