expendable section sfdcmonkey

How To Create Expand/Collapse Sections In Salesforce Lightning Component

Lightning Component

Hi guys, today in this post we will learn that how we can create dynamic reusable custom expandable / collapsible sections in salesforce lightning component.

collapse-expend section sfdc

From developer console >> file >> new >> Lightning Component 

Lightning Component : collapseSections.cmp

  • Important : section aura:id and data-auraId attributes must be same. (check highlighted code )
JavaScript Controller : collapseSectionsController.js

  • check code comments.
TestApp :

From developer console >> file >> new >> Lightning Application

Output :

collapse-expend section sfdc

Other popular Post :

Like our facebook page for new post updates. & Don’t forget to bookmark this site for your future reference.

if you have any suggestions or issue with it, you can post in comment box.

Happy Learning ?

(Visited 5,773 times, 1 visits today)

5 comments

Leave a Reply