Configure a Component for Lightning Console App

To use a Lightning web component as a navigation item in a custom console app, define the component’s metadata.

The componentName.js-meta.xml file defines the metadata values for the component. To make your component available as a navigation item, set isExposed to true, and define a lightning__AppPage target.

1<?xml version="1.0" encoding="UTF-8" ?>
2<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3    <apiVersion>60.0</apiVersion>
4    <isExposed>true</isExposed>
5    <targets>
6        <target>lightning__AppPage</target>
7    </targets>
8</LightningComponentBundle>

After configuring the component, you can create or edit a custom console app and add your component as a navigation item.

To work with workspace tabs and subtabs programmatically, use the Lightning Console JavaScript API.

The lwc-recipes repo has examples of working with workspace tabs. Look for components that start with workspace, such as workspaceAPIFocusTab.

Tip

See Also