+ Start a Discussion
Alex YhapAlex Yhap 

How do you use base lightning components in Visualforce page?

If I want to use a lightning component like a button (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_button.htm) how would I write the JS? I know you can do custom lighting components like below
$Lightning.use("c:SampleApp", function() {
            $Lightning.createComponent("c:sampleComponent",
                                       {label: ""}, 
                                       "lightning",
                                       function(cmp) {
                                           //  Do some stuff
                                       }
            );
        });

How would you write the JS for a base lightning component?
Balayesu ChilakalapudiBalayesu Chilakalapudi
Lightningdesignsystem is available for vf pages (you need to use some javascript as well)
Install SLDS package., you can place lightning button in your vf page like this,
<button class="slds-button">Button</button>
find more details in 
https://lightningdesignsystem.com/components/buttons/