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 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.

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 apiVersion.

Beginning in Winter '24, LWC supports versioning for custom components. All API versions of 58.0 and earlier correspond to 58.0 (Summer '23). To apply bug fixes and new functionality that are tied to a later API version, upgrade your component's API version.

A capability is something that a component can do, as opposed to a target, which defines where you can use a component.

Supports the capability subtag.

Valid values are:

ValueDescription
lightningCommunity__RelaxedCSPEnables 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.
lightning__dynamicComponentEnables a component to dynamically instantiate other components.
lightning__ServerRenderableEnables server-side rendering (SSR) with islands architecture for a page. For Experience Builder sites that use Lightning Web Runtime only.
lightning__ServerRenderableWithHydrationEnables SSR with hydration for a custom component. For Experience Builder sites that use Lightning Web Runtime only.
lightning__ServiceCloudVoiceToolkitApiEnables 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.

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 the builders like Lightning App Builder and Experience Builder.

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.

The title of the component. Appears in list views, like the list of Lightning Components in Setup, and in the builders.

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 builders, specify at least one Lightning page type.

Supports the target subtag.

A page type. Valid values are:

ValueDescription
analytics__DashboardEnables a component to be used as a widget in a CRM Analytics dashboard.
lightningCommunity__DefaultEnables 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.
lightningCommunity__PageEnables a drag-and-drop component to be used on a page in Experience Builder. Components appear in the Components panel.
lightningCommunity__Page_LayoutEnables a component to be used in Experience Builder as a page layout for an LWR site. Components appear in the Content Layout window.
lightningCommunity__Theme_LayoutEnables a component to be used in Experience Builder as a theme layout for an LWR site. Components appear in Settings in the Theme area.
lightningSnapin__ChatHeaderEnables 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.
lightningSnapin__ChatMessageEnables 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.
lightningSnapin__MessagingPreChatEnables a custom pre-chat component to be selected from Embedded Service Deployments in Setup.
lightningSnapin__MessagingHeaderEnables a custom component to be selected from Embedded Service Deployments in Setup.
lightningSnapin__MinimizedEnables 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.
lightningSnapin__PreChatEnables 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.
lightningStatic__EmailEnables a component to be used in and Email Content Builder.
lightning__AppPageEnables a component to be used on an App page in Lightning App Builder. Enables a component to be used in a Lightning app, such as in a Console app.
lightning__ECSFSAppEnables a component to be used in Field Service Mobile App Builder.
lightning__EnablementProgramEnables 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.
lightning__FlowScreenEnables a component to be used on flow screens in Flow Builder.
lightning__GlobalActionEnables 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.
lightning__HomePageEnables a component to be used on a Home page in Lightning App Builder.
lightning__InboxEnables a component to be used in Lightning App Builder to add to email application panes for the Outlook and Gmail integrations.
lightning__RecordActionEnables 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.
lightning__RecordPageEnables a component to be used on a record page in Lightning App Builder.
lightning__ServiceDocumentEnables a component to be used in Document Builder.
lightning__TabEnables a component to be used in a custom tab in Lightning Experience or the Salesforce mobile app.
lightning__UtilityBarEnables a component to be used as a utility item on the utility bar in the App Manager.
lightning_VoiceExtensionEnables a component to be used on a Voice Extension page in Lightning App Builder.

See Also