Use Components From a Managed Package

Managed packages can provide helpful functionality for your org. Some managed packages include managed Lightning web components. After installing a managed package via AppExchange, you can reference a managed Lightning web component (LWC) that's included in a managed package by using it in your custom component.

Authors of managed packages must test with both Lightning Locker and Lightning Web Security (LWC) to make sure their components work in both environments. To ensure that the managed package works in orgs where LWS isn't enabled, don't rely on LWS-only features. We recommend installing and testing the managed package in a sandbox first before installing it in your production orgs.

A Lightning web component in a managed package has a different namespace than your own. We recommend that you refer to the documentation on the managed package.

When you use an LWC from a managed package in your custom component, use kebab case (dash-separated). Similarly, the global attributes you use in the LWC HTML template must use kebab case.

For example, if the managed package contains an LWC in the lwc_partner namespace and the managed component name is account-verification, you can reference the component like this.

A managed LWC can be used in different LWC targets, which you can verify with the corresponding managed package documentation. For example, if you use the managed LWC in your custom LWC, you can surface the managed LWC in various targets by updating the <targets> configuration tag.

See Also