1

I created one simple LWC component and when I tried to add it in Lightning App Builder I'm not able to see it. So how to add LWC in lightning app builder.

  • For this, you have make some change in the component meta xml file. – itzmukeshy7 Mar 19 at 8:26
4

To make an LWC available in the app builder you will have to set the correct values in the configuration file of the component.

You can find all the details on this link: https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.use_config_for_app_builder

4

First you need to in target tag where you want to expose your component in meta.xml file like below -

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
   <apiVersion>45.0</apiVersion>
   <isExposed>true</isExposed>
   <targets>
       <target>lightning__AppPage</target>
       <target>lightning__RecordPage</target>
       <target>lightning__HomePage</target>
   </targets>
</LightningComponentBundle>

And then in visual studio, right click on component folder name and select "SFDC: Deploye source to org" command. After deploy it will be visible in app builder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.