Activity Forums Salesforce® Discussions Using SLDS styles in salesforce aura component

  • Satyakam

    Member
    January 4, 2017 at 12:54 pm

    Hi Kumar,

    If you have added your static resource named as 'SLDS' than you can use this in your component like:

    <ltng:require styles="{!$Resource.SLDS +'/assets/styles/salesforce-lightning-design-system.css'}"/>

    Thanks

  • Kumar

    Member
    January 4, 2017 at 1:27 pm

    Thanks!

  • Rajendra Rathore

    Member
    July 19, 2017 at 4:30 pm

    You can use extends="force:slds" in lightning application. So it will automatically apply slds to lightning components that are related to application.

     

    Example:

    <aura:application extends="force:slds">
    <!--component reference>
    </aura:application>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos