Code By Code – Lightning Framework – Chapter 16 – Lightning Interfaces

Code By Code – Lightning Framework – Chapter 16 – Lightning Interfaces

Chapter 16

Topics for this chapter:

  • Lightning Interfaces

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:

<aura:component implements="flexipage:availableForAllPageTypes">

Some Of The Existing Lightning Interfaces

flexipage:availableForAllPageTypes
A global interface that makes a component available in the Lightning App Builder, and for any type of Lightning page


flexipage:availableForRecordHome
If your component is designed only for record pages, implement the flexipage:availableForRecordHome interface instead of flexipage:availableForAllPageTypes

forceCommunity:availableForAllPageTypes
To appear in Community Builder, a component must implement the forceCommunity:availableForAllPageTypes interface.

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

force:lightningQuickAction
Allows a component to display in a panel with standard action controls as a quick action. For ex. Cancel button.

force:lightningQuickActionWithoutHeader
Allows a component to display in a panel without additional controls. The component should provide a complete user interface for the action.

force:hasRecordId
Add the force:hasRecordId interface to a Lightning component to enable the component to be assigned the ID of the current record.

force:hasSObjectName
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.

lightning:actionOverride
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

Lightning Interfaces

Next In This Guide

Manish Choudhari

I am a certified Salesforce Application & System Architect and Developer working on Salesforce Technology since 2014. Currently, I have 14 Salesforce certifications along with OCPJP (Oracle Certified Profession JavaSE6 Programmer) working in Salesforce.com Hyderabad as a Technical Engineer. Writing technical blogs, learning new technologies and frameworks and sharing knowledge is my hobby.

This Post Has 2 Comments

  1. Avatar

    Hi Manish,

    I’ve been following your Lightning series, and you have very detailed tutorials. Am glad found your blogs!

    Would you mine to share your full css on CarTile.cmp as well the codes on CarDetail.cmp?

    Thanks.

    Regards,
    Chris

Leave a Reply

Close Menu