Migrate Access Controls

Migrate access controls for an Aura component to the appropriate value for <isExposed> in a Lightning web component’s configuration file. Migrate access controls for an attribute in an Aura component to the appropriate combination of a JavaScript property decorator and value for <isExposed>.

To manage access to an Aura bundle’s resources, such as a component or attribute, use the access system attribute. For example, this component has global access, which means that the component can be added to a managed package and used in another org. The Aura component can also be used in Lightning App Builder or Experience Builder in another org if it implements the appropriate interface.

1<aura:component access="global">
2    ...
3</aura:component>

The mechanism for access control is different in a Lightning web component, where access is defined by JavaScript property decorators and the component’s configuration file.

Component 

Here’s how the access values for an Aura component map to a Lightning web component.

public

Available within your org only.

Set <isExposed>false</isExposed> in the component’s configuration file.

global

Available in all orgs. The component can be added to a managed package and used in another org. The Aura component can also be used in Lightning App Builder or Experience Builder in another org.

Set <isExposed>true</isExposed> in the component’s configuration file.

Attribute 

Here’s how the access values for an Aura attribute map to a Lightning web component.

private

Available within the component only.

Use a JavaScript field.

public

Available within your org only.

Do both of these steps in a Lightning web component.

  1. Use a JavaScript field with an @api decorator.
  2. Set <isExposed>false</isExposed> in the component’s configuration file.
global

Available in all orgs.

Do both of these steps in a Lightning web component.

  1. Use a JavaScript property with an @api decorator.
  2. Set <isExposed>true</isExposed> in the component’s configuration file.

See Also