Custom Tab For Lightning Web Components

We can use the lightning web component in the custom tab( in lightning experience and salesforce mobile app) with the winter 20 release.

If you have created lighting web component you know that there is a configuration file that represents the metadata values for the component. To allow lighting web component to be use in lightning app builder we need to set “isExposed” to TRUE. Adding “lightning__Tab” to target will allow to use lwc in custom lighting component tab.

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="HelloCustomer">
<apiVersion>47.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
<target>lightning__Tab</target>
</targets>
</LightningComponentBundle>
view raw HelloCustomer.xml hosted with ❤ by GitHub

Goto -> Setup -> Quick Find -> search “tab” -> click on tab

Click on “New” button
Select your lightning web component

Thanks

Arun Kumar

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s