Topics for this chapter:
- Lightning Interfaces
Lightning Interfaces are a great way to share the same properties across all components implementing them. Interfaces define a component’s shape by defining attributes, events, or methods that any implementing component contains.
To implement an interface, use implements attribute of aura component. Below is an example:
Some Of The Existing Lightning Interfaces
A global interface that makes a component available in the Lightning App Builder, and for any type of Lightning page
If your component is designed only for record pages, implement the flexipage:availableForRecordHome interface instead of flexipage:availableForAllPageTypes
To appear in Community Builder, a component must implement the forceCommunity:availableForAllPageTypes interface.
Allows a component to be used as a custom tab in Lightning Experience or the Salesforce app.
Allows a component to display in a panel with standard action controls as a quick action. For ex. Cancel button.
Allows a component to display in a panel without additional controls. The component should provide a complete user interface for the action.
Add the force:hasRecordId interface to a Lightning component to enable the component to be assigned the ID of the current record.
Add the force:hasSObjectName interface to a Lightning component to enable the component to be assigned the API name of current record’s sObject type.
Add the lightning:actionOverride interface to a Lightning component to enable the component to be used to override a standard action on an object.
Lightning Component Development Day8 - Lightning Data Service, Lightning Interfaces, App Builder
Test your knowledge