Friday 24 April 2020

Lightning Component Interfaces

There are some important Lightning Component Interfaces are :


1. flexipage:availableForRecordHome : This interface means that we can use this component inside the record page of any object.

2. force:hasRecordId : It gives the record id of the record inside which we have put our component.

3. force:hasSObjectName : This interface is useful for whenever we are using the same component inside the different objects.
For ex :  If we have a custom component that is useful for creating case and we are using that component inside two objects that are Account and Contact , so that using this interface we can check under which objects that particular component has been placed.

4. flexipage:availableForAllPageTypes : This interface is used for if we want to make component available for in a Lightning App Builder , in a Record Page or in a Home Page.

5. forceCommunity:availableForAllPageTypes : If we want to use component in the Lightning Communities then we have to implemented this interface.

6. force:appHostable : If we want to use our Lightning Component as a Tab , for that we have to implemented this interface.

7. force:lightningQuickAction or force:lightningQuickActionWithoutHeader : If we want to use our lightning component as a quick action , then we have to implement this interface.

The basic difference between force:lightningQuickAction and force:lightningQuickActionWithoutHeader is that if we are using force:lightningQuickAction it will give us some standard action like Cancel and Close button on the modal but this is not available in force:lightningQuickActionWithoutHeader.

8. ltng:allowGuestAccess : If we want our component to be visible in the lightning community for unauthorized user like guest user , then we have to use this interface.



Other Useful Blog
Lightning Web Component


Happy Learning !!

No comments:

Post a Comment