1

If I want to develop a lightning component to place within a community and make a list view to look like the it's styled in the lightning style, do I need to use the SLDS package/static resource and include the stylesheet in the component, or can I style it using the community style?

I'm just trying to understand whether I have to include this or will it be there already to use with the component.

  • Are you building an ISV app or customizing a community for a client ? – Mohith Shrivastava May 6 '16 at 21:06
  • Our own customer community, using the Napili template. – Paul Kissick May 6 '16 at 21:07
1

Community Cloud is based on Standard SLDS Design .But since you are building a custom component its better to import the SLDS package and use Standard SLDS in static resource so that you have complete control over the CSS and not rely on salesforce designs which will be upgraded with every release and that may tend to be not desired.

<aura:component implements="forceCommunity:availableForAllPageTypes" controller="HomePageCmpController">
<ltng:require styles="/resource/REPLACE_WITH_NAME_OF_SLDS_STATIC_RESOURCE/assets/styles/salesforce-lightning-design-system-ltng.css" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.