Link

XML Configuration File Elements - Salesforce Lightning Component Library

Intro

Each LWC folder must include a configuration file named <component>.js-meta.xml. This file defines the metadata values for the component, including the design configuration for components intended for use in Lightning App Builder as:

<aside> 🔥 A custom LWC can’t access another LWC or module in a custom namespace. It can access Lightning web components and modules only in the c and lightning namespaces.

</aside>

File specification

apiVersion : A double value that binds the component to a Salesforce API version.

description : A brief description of the component, usually a single sentence. Appears in list views, like the list of Lightning Components in Setup, and as a tooltip in the Lightning App Builder and in Community Builder.

masterLabel: The title of the component. Appears in list views, like the list of Lightning Components in Setup, and in the Lightning App Builder and in Community Builder.

isExposed : to allow the component to be used in Lightning App Builder or Community Builder, set isExposed to true and define at least one <target>, which is a type of Lightning page.

targets: specifies where the component can be added, such as on a type of Lightning Page or in Embedded Service Chat. If you want your component to appear in the Lightning App Builder or in Community Builder, specify at least one Lightning page type. Valid values are:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0776b90a-2cf5-43f2-b9d3-a5fa2f6bcf59/Untitled.png

targetConfigs: configure the component for different page types and define component properties. For example, a component could have different properties on a record home page than on the Salesforce Home page or on an app page. For Communities, only lightningCommunity__Default supports component properties. Use a separate targetConfig for each different page type configuration. Specify one or more page types in the targets attribute, such as <targetConfig targets="lightning__RecordPage"> or <targetConfig targets="lightning__RecordPage,lightning__AppPage">.