Migrate Interfaces Implementing an Aura interface enables you to receive context data or to surface your custom component in different contexts, such as in the Lightning App Builder or Experience Builder.
To receive context data in a Lightning web component, import the corresponding module. To surface a component in different contexts, use the targets
metadata in your *.js-meta.xml
configuration file.
Aura interfaces that aren’t listed don’t currently have an equivalent in Lightning Web Components.
clients:availableForMailAppPage
In *.js-meta.xml
:
< targets> < target> lightning__Inbox</ target> </ targets>
Indicates that the component can be used in Lightning App Builder to add to email application panes for the Outlook and Gmail integrations. See Create Components for the Outlook and Gmail Integrations .
clients:hasEventContext
import { LightningElement , api } from 'lwc' ; @api dates; @api location ;
In *.js-meta.xml
:
< targets> < target> lightning__Inbox</ target> </ targets>
Indicates that the component takes context information about an event when used with the Outlook and Gmail integrations. See Create Components for the Outlook and Gmail Integrations .
clients:hasItemContext
import { LightningElement , api } from 'lwc' ; @api mode; @api people; @api source; @api subject; @api messageBody;
In *.js-meta.xml:
< targets> < target> lightning__Inbox</ target> </ targets>
Indicates that the component takes context information about an email or calendar event when used with the Outlook and Gmail integrations. See Create Components for the Outlook and Gmail Integrations .
flexipage:availableForAllPageTypes
In *.js-meta.xml:
< targets> < target> lightning__AppPage</ target> < target> lightning__RecordPage</ target> < target> lightning__HomePage</ target> < target> lightning__UtilityBar</ target> </ targets>
Indicates that the component is available for record pages, the utility bar, and any other type of pages. Specify each page type explicitly as a target. See Configure a Component for Lightning App Builder and Configure a Component for the Utility Bar .
flexipage:availableForRecordHome
< targets> < target> lightning__RecordPage</ target> </ targets>
Indicates that the component is available for record pages only.
force:hasRecordId
import { LightningElement , api } from 'lwc' ; @api recordId;
In *.js-meta.xml:
< targets> < target> lightning__RecordPage</ target> </ targets>
Indicates that the component takes a record Id as an attribute. See Make a Component Aware of Its Record Context .
force:hasSObjectName
import { LightningElement , api } from 'lwc' ; @api objectApiName;
In *.js-meta.xml:
< targets> < target> lightning__RecordPage</ target> </ targets>
Indicates that the component takes the API name of the current record’s object type. See Make a Component Aware of Its Object Context .
force:lightningQuickAction
In *.js-meta.xml:
< targets> < target> lightning__RecordAction</ target> </ targets> < targetConfigs> < targetConfig targets = " lightning__RecordAction" > < actionType> ScreenAction</ actionType> </ targetConfig> </ targetConfigs>
Indicates that the component is a quick action. See Configure a Component for Quick Actions .
LWC quick actions are currently supported only on the record page.
force:lightningQuickActionWithoutHeader
In *.js-meta.xml:
< targets> < target> lightning__RecordAction</ target> </ targets> < targetConfigs> < targetConfig targets = " lightning__RecordAction" > < actionType> ScreenAction</ actionType> </ targetConfig> </ targetConfigs>
Indicates that the component is a quick action with no header. See Configure a Component for Quick Actions .
LWC quick actions are currently supported only on the record page.
forceCommunity:availableForAllPageTypes
In *.js-meta.xml:
< targets> < target> lightningCommunity__Page</ target> </ targets>
Indicates that the component can be used in Experience Builder. See Configure a Component for Experience Builder .
lightning:hasPageReference
import { CurrentPageReference } from 'lightning/navigation' ; @wire ( CurrentPageReference ) pageRef;
Indicates that the component accepts a PageReference. See Navigate to Pages, Records, and Lists .
lightning:isURLAddressable
In *.js-meta.xml:
< isExposed> true</ isExposed> < targets> < target> lightning__UrlAddressable</ target> </ targets>
Indicates that the component is directly addressable via URL with the pattern /lightning/cmp/componentName
. You can also navigate to the component using the standard__component
page reference type. See Navigate to Pages, Records, and Lists .