Hello everyone, In this tutorial, We will discuss Lightning Component interfaces. The list of the namespace from where lightning component interface belongs and also discusses some of these interfaces in details.

After completing this tutorial, you’ll able to understand:
  • Lightning component namespaces.
  • Lightning component interfaces.
So let’s begin,

Lightning Interfaces uses to allow a component to be used in different contexts, or to enable your Lightning component to receive extra context data. A Lightning component can use multiple interfaces. Interfaces that user in component have an effect only in Lightning Experience and the Salesforce app.

Lightning Component interfaces belong to different namespaces, including:

clients: This namespace provides interfaces that are specific to the Outlook integration or Lightning for Gmail.

flexipage: This namespace provides interfaces that are specific to Lightning Pages and the Lightning App Builder.

force: This namespace provides interfaces that are specific to Lightning Experience and the Salesforce app.

forceCommunity: This namespace provides interfaces that are specific to Communities.

lightning: This namespace provides interfaces that are specific to Lightning Experience, the Salesforce app, and Communities.

ltng: This namespace provides events that are handled by Lightning Out.

Some of these interfaces from above namespace are summarized below.

1. clients:availableForMailAppAppPage -  This interface use to appear component in Lightning App builder or a Lightning Page in Outlook integration or Lightning for Gmail.

2. clients:hasEventContext - Use to enable a component to be assigned to an event’s date or location attributes in Outlook integration and Lightning for Gmail.

3. clients:hasItemContext - Use to enable a component to be assigned to an email’s or a calendar event’s item attribute in Outlook integration and Lightning for Gmail.

4. ltng:allowGuestAccess - Using this interface in your Lightning Out dependency app, available to users without requiring them to authenticate with Salesforce. This interface lets you deploy your app with lightning component anywhere and to anyone.

5. flexipage:availableForAllPageTypes - It’s a global interface that available component in the Lightning App builder, and for any types of Lightning page.

Note: To make a component available for utility bar flexipage:availableForAllPageTypes interface must be used in your component.

6. flexipage:availableForRecordHome - Make your Lightning component available for record pages.

7. forceCommunity:availableForAllPageTypes - Make your Lightning component available for Community Builder.

8. force:appHostable - Make a component to be used as a custom tab in Lightning Experience or the Salesforce app.

9. force: lightningQuickAction - This interface make your component available for display in a panel with standard action controls, such as a Cancel button. By using this interface component can also display and implement their own controls, but should handle events from the standard controls.

Note: If you implement force: lightningQuickAction in your component, you can’t implement force: lightningQuickActionWithoutHeader within the same component.

10. force: lightningQuickActionWithoutHeader - Make your component to display in a panel without additional controls. Your component should provide a complete user interface for the action.

Note: If you implement force: lightningQuickActionWithoutHeader in your component, you can’t implement force: lightningQuickAction within the same component.

See also:
Conclusion:
Hope you like this tutorial, for any question and suggestion please feel free to comment.
Thank you.