Skip to content

Instantly share code, notes, and snippets.

@lfreeland
Created April 9, 2018 00:05
Show Gist options
  • Save lfreeland/56920e809a13c1374717b9890de65a8a to your computer and use it in GitHub Desktop.
Save lfreeland/56920e809a13c1374717b9890de65a8a to your computer and use it in GitHub Desktop.
Collapsible Section Lightning Component Markup
<aura:component>
<aura:attribute name="title" type="String" />
<div class="slds-section slds-is-open"
aura:id="collapsibleSectionContainer">
<h3 class="slds-section__title slds-theme_shade">
<!-- button state defaults to false so state
represents "is collapsed"
-->
<lightning:buttonStateful labelWhenOff="{! v.title }"
labelWhenOn="{! v.title }"
iconNameWhenOff="utility:chevrondown"
iconNameWhenOn="utility:chevronright"
onclick="{! c.handleSectionHeaderClick }"
class="slds-section__title-action" />
</h3>
<div class="slds-section__content" >
{! v.body }
</div>
</div>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment