XML Configuration File Elements
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 Lightning App Builder and Experience Builder.
Salesforce API version
45.0 or higher. Regardless of
apiVersion, the component always uses the latest version of Lightning Data Service and base Lightning components. The Lightning Locker version is set at the org level, and isn't related to the component
A capability is something that a component can do, as opposed to a target, which defines where you can use a component.
Valid values are:
|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 |
|Enables a component to use the Service Cloud Voice Toolkit API. A component that uses the |
|Enables a component to dynamically instantiate other components.|
A short description of the component, usually a single sentence. The description appears in list views, like the list of Lightning Components in Setup, and as a tooltip in Lightning App Builder and Experience Builder.
false, the component isn’t exposed to Lightning App Builder or Experience Builder.
To allow the component to be used in Lightning App Builder or Experience Builder, set
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
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 Experience Builder.
The namespace of the managed package of your Vlocity Lightning web components. See Salesforce Help: Vlocity User Interaction Tools.
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 Experience Builder, specify at least one Lightning page type.
A page type. Valid values are:
|Enables a component in Experience Builder to expose editable properties when the component is selected. Only properties defined for the |
|Enables a drag-and-drop component to be used on a page in Experience Builder. Components appear in the Components panel.|
|Enables a component to be used in Experience Builder as a page layout for an LWR site. Components appear in the Content Layout window.|
|Enables a component to be used in Experience Builder as a theme layout for an LWR site. Components appear in Settings in the Theme area.|
|Enables a custom chat header component to be selected from Embedded Service Chat Setup. A component that imports the |
|Enables a custom chat message component to be selected from Embedded Service Chat Setup. A component that imports the |
|Enables a custom minimized component to be selected from Embedded Service Chat Setup. A component that imports the |
|Enables a custom prechat component to be selected from Embedded Service Chat Setup. A component that imports the |
|Enables a component to be used in and Email Content Builder.|
|Enables a component to be used on an App page in Lightning App Builder.|
|Enables a component to be used on flow screens in Flow Builder.|
|Enables a component to be used on a Home page in Lightning App Builder.|
|Enables a component to be used in Lightning App Builder to add to email application panes for the Outlook and Gmail integrations.|
|Enables a component to be used as a quick action on a record page. To specify the type of quick action, define a |
|Enables a component to be used on a record page in Lightning App Builder.|
|Enables a component to be used in a custom tab in Lightning Experience or the Salesforce mobile app.|
|Enables a component to be used as a utility item on the utility bar in the App Manager.|
|Enables a component to be used on a Voice Extension page in Lightning App Builder.|
|Enables a component to be used as a widget in a CRM Analytics dashboard.|
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 Experience Builder sites, only
lightningCommunity__Default supports component properties.
Use a separate
targetConfig for each different page type configuration. The
targetConfig tag supports these attributes:
|Specify the type of Lightning web component quick action. The supported types are ||No|
|Registers a custom property editor for a flow screen component. A custom property editor is a Lightning web component that provides a custom UI for configuring a custom flow screen component’s input attributes. See Customize Action and Screen Component UI in Flow Builder. Only supported if the ||No|
|Specify one or more page types in the ||Yes|
targetConfig tag supports these subtags.
These subtags support various attributes and subtags.
Exposes an event for Dynamic Interactions, which allows it to appear on the Events tab in the Lightning App Builder component property panel.
This tag is only supported if the
event tag supports these attributes:
|The description of the event. Appears as an i-bubble on the event label in Lightning App Builder.||No|
|The admin-friendly label for the event.||No|
|The name of the event as defined in the ||Yes|
property tag supports these attributes:
|Renders a field as a picklist, with static values. Supported only if the ||No|
|The default value for the attribute||No|
|Displays as an i-bubble for the attribute in the tool.||No|
|Required if you use the ||No|
|Supported only if the target is ||No|
|Displays as a label for the attribute in the tool.||No|
|The maximum allowed value for an attribute of type ||No|
|The minimum allowed value for an attribute of type ||No|
|Input placeholder text for the attribute when it displays in the tool. This text is the ghost text in text fields and text areas before a user starts typing. Supported only if the ||No|
|Specifies whether the attribute is required. The default value is ||No|
|Specifies whether the attribute is ||No|
|Specifies if a component integer or string property is screen-size responsive. The default value is ||No|
Defines a data type to extend for component properties in flow screen components. Only generic
sObject collection data types can be extended.
Supported only if the target is
|Specifies the data type to extend for component properties.||Yes|
|Description of the property type.||No|
|Label of the property type.||No|
|Specifies the data type name to reference from each ||Yes|
Limits the component to a set of one or more objects. If you don’t use this tag set, the component supports all supported objects. This tag set works only inside a parent
targetConfig that’s configured for
objects tag set only one time inside a
Defines which objects the component is supported for. Use one
object tag for each supported object.
See the User Interface API Developer Guide for the list of supported objects.
Provides the shape of an
event. Content in the
schema tag must be in JSON format.
The Dynamic Interactions feature uses only
properties from the schema. All other items in the schema are ignored. In the event schema, valid property types are String, Integer, and Boolean. For an example schema, see Configure a Component for Dynamic Interactions in the Lightning App Builder.
Supported only if the
A set of one or more form factors or devices that the component supports. Specify the
supportedFormFactors tag set one time inside a
targetConfig set. Supports the
supportedFormFactors doesn’t work for these targets:
Defines which form factor or device the component supports. Use one
supportedFormFactor tag for each supported form factor.
supportedFormFactor tag supports these attributes:
|Device form factor on which the component displays. Valid values are:||Yes|
We strongly recommend including supported form factor information in the configuration file for all your components. See Configure Your Component for Different Form Factors.
Provides CRM Analytics query data from a dashboard step to the component. This tag works only with the
analytics__Dashboard target. The
hasStep tag is a boolean setting, with a default value of
- Component Configuration File
- Configure a Component for Lightning App Builder
- Configure a Component for Experience Builder
- Configure a Component for Flow Screens
- Configure a Component for the Utility Bar
- Configure Your Component for Different Form Factors
- Create Components for the Outlook and Gmail Integrations
- Quick Actions
- Salesforce Help: Understanding Packages