How do you make an LWC available in Lightning App Builder, Record pages or Experience Builder, and expose configurable properties?
Answer
Configure the component's js-meta.xml:
xml
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>60.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__RecordPage</target>
<target>lightning__AppPage</target>
<target>lightning__HomePage</target>
</targets>
<targetConfigs>
<targetConfig targets="lightning__RecordPage">
<property name="title" type="String" default="Hello"/>
<objects><object>Account</object></objects>
</targetConfig>
</targetConfigs>
</LightningComponentBundle>
Set isExposed to true, list targets, and declare each admin-configurable property in targetConfigs; the JS must expose it with @api title;. Use lightningCommunity__Page for Experience Builder.
lwcapp-buildermeta-xml