I am developing a lightning component, I am adding it in a lightning app builder and using it, but how can i use the same lightning component in desktop. Also, should i use lightning design system or bootstrap while building responsive lightning component.
1 Answer
If you want your component to be available for use in Lightning pages on the platform, just as with Salesforce1, it needs to have the following line added to it:
<aura:component implements="force:appHostable">
To use it on a visualforce page, also add the following:
<aura:application access="GLOBAL" extends="ltng:outApp">
<aura:dependency resource="ui:button"/>
</aura:application>
If you want to add it to a community page, you need to add this line:
<aura:component implements="forceCommunity:layout" access="global">
If you want to use it with the desktop, the LDS will be the most compatible to use.
For more, see the Lightning Components Developer Guide and the Lightning FAQ.
-
Can i use bootstrap and LDS together. If not, which one to use as i want my component to be mobile as well as desktop ready.– EjazCommented May 17, 2016 at 14:11
-
1You can use either one of them. Both work well for mobiles. Using both may result in CSS conflicts. Commented May 17, 2016 at 14:35
-
1It's possible to use bootstrap. SF recommends you use LDS. You'll find a number of posts in the forum on issues people have had using bootstrap. I recommend you search for them and read them. Commented May 17, 2016 at 14:35
-