Each Lightning web component folder must include a configuration file named componentName.js-meta.xml. The configuration file defines the metadata values for the component, including targets and the design configuration for the builders like Lightning App Builder and Experience Builder.
Want to check out sample configuration files? The lwc-recipes repo contains components with configuration files, like this one for the eventSimple example component. Look for .js-meta.xml configuration files in the component bundles in force-app/main/default/lwc.
Tip
Throughout this page, you can click on any subtag value name (like lightning__AppPage or lightning__RecordPage) to learn more about its specific properties and configuration options.
ai
Defines an AI description for the component and its properties. The ai tag set is supported only for record pages in orgs that have Setup with Agentforce enabled. For more information, see Setup with Agentforce.
Add the ai tag set at the top level of the js-meta.xml file. Specify the ai tag only once. The ai tag contains one description tag, and can contain multiple property tags.
description
The AI-related description of the component. This description isn’t user-facing. Agentforce uses this description to analyze the component for inclusion in agent-generated Lightning pages. AI component descriptions can be up to 4,000 characters. See Tips for Writing AI Component Descriptions.
property
Each property tag in the ai tag set contains the AI-related description for a single component property. Provide a property tag for each component property that’s annotated by @api.
This tag doesn’t replace the property tag in the targetConfig section, but enhances it by providing an AI description. Define the component properties using the property tag in the targetConfig tag set just like usual.
Use the property tag with these attributes.
Attribute
Type
Description
Required
aiDescription
String
The AI description for the property. This property description isn’t user-facing. Agentforce uses it to help in its analysis of the component for inclusion in agent-created Lightning pages.
Yes
name
String
The attribute name. This value must match the property name in the component’s JavaScript class. It must also match the name value defined for this property in the targetConfig tag set.
Yes
apiVersion
Salesforce API version 45.0 or higher. Regardless of apiVersion, the component always uses the latest version of Lightning Data Service and Lightning base components. The Lightning Locker version is set at the org level, and isn’t related to the component apiVersion.
Beginning in Winter ‘24, LWC supports versioning for custom components. Beginning in Spring ’25, all components must specify an API version. Unversioned components continue to work as before, but must have an apiVersion tag set to save changes back to Salesforce. To apply bug fixes and new functionality that are tied to a later API version, upgrade your component’s API version.
capabilities
A capability is something that a component can do, as opposed to a target, which defines where you can use a component.
Enables a component installed from a managed package to run in an Experience Builder site that has Lightning Locker disabled. This setting allows managed package developers to opt in to running their Lightning web components in a site with Lightning Locker disabled. Lightning web components in a managed package that don’t include the lightningCommunity__RelaxedCSP tag are disabled in the Components panel in Experience Builder for any site with Lightning Locker disabled. Nested components must also include this tag.
Enables a component to use the Service Cloud Voice Toolkit API. A component that uses the lightning-service-cloud-voice-toolkit-api component must specify the lightning__ServiceCloudVoiceToolkitApi capability.
description
A short description of the component, usually a single sentence. This user-facing description appears in list views, like the list of Lightning Components in Setup, and as a tooltip in the builders like Lightning App Builder and Experience Builder.
isExposed
If isExposed is false, the component isn’t exposed in the builders.
To allow the component to be used in a builder, set isExposed to true and define at least one <target>, which is a type of Lightning page.
A custom Lightning web component can’t access a Lightning web component or module in a custom namespace. It can access Lightning web components and modules only in the c and lightning namespaces.
Note
masterLabel
The title of the component. Appears in list views, like the list of Lightning Components in Setup, and in the builders.
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 builders, specify at least one Lightning page type.
Supports the target subtag.
target
A page or container type. Valid values are:
Click on any target names (like lightning__AppPage or lightning__RecordPage) to learn more about its properties and configuration options, including support for targetConfigs tags and subtags.
Enables a component in Experience Builder to expose editable properties when the component is selected. Only properties defined for the lightningCommunity__Page or lightningCommunity__Theme_Layout targets are editable in Experience Builder.
Enables a custom chat header component to be selected from Embedded Service Chat Setup. A component that imports the lightningsnapin/baseChatHeader module must specify that lightningSnapin__ChatHeader target.
Enables a custom chat message component to be selected from Embedded Service Chat Setup. A component that imports the lightningsnapin/baseChatMessage module must specify the lightningSnapin__ChatMessage target.
Enables a custom minimized component to be selected from Embedded Service Chat Setup. A component that imports the lightningsnapin/minimized module must specify the lightningSnapin__Minimized target.
Enables a custom prechat component to be selected from Embedded Service Chat Setup. A component that imports the lightningsnapin/basePrechat module must specify the lightningSnapin__PreChat target.
Enables a component to be used in Program Builder as a custom exercise type for an Enablement program. Components appear in the Custom Items section of the Components list in the Program Builder palette.
Enables a component to be used as a global quick action. To specify the type of global quick action, define a targetConfig for lightning_GlobalAction with an actionType attribute.
Enables a component to be used as a custom property editor in Experience Builder. Reference it in a LightningTypeBundle or in an Experience Builder component’s js-meta.xml file.
Enables a component to be used as a quick action on a record page. To specify the type of quick action, define a targetConfig for lightning_RecordAction with an actionType attribute.
This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.