Activity Forums Salesforce® Discussions How to add lightning component in Salesforce visualforce page?

  • shradha jain

    Member
    July 17, 2018 at 9:21 am

    Hello Prachi,

    There are four steps to add Lightning components to a Visualforce page:
    1. Add the Lightning Components for Visualforce JavaScript library to your Visualforce page using the "<apex:includeLightning/>" component.
    2. Create  a Lightning app that declares your component dependencies

    3. Reference this Lightning dependency  app.

    4.  Create the component on the page using the function "$Lightning.createComponent()".

    • This reply was modified 6 years, 5 months ago by  shradha jain.
  • Avnish Yadav

    Member
    September 10, 2018 at 6:43 am

    Hello Prachi,

    There are three steps to add Lightning components to a Visualforce page.

    • Add the Lightning Components for Visualforce JavaScript library to your Visualforce page using the <apex:includeLightning/> component.
    • Create and reference a Lightning app that declares your component dependencies.
    • Write a JavaScript function that creates the component on the page using $Lightning.createComponent().

    Thanks.

     

     

     

  • Parul

    Member
    September 10, 2018 at 6:52 am

    Hi Prachi,

    In winter ‘16 a new and powerful feature was  introduced  which allow you to implement your lightning component in visualforce pages.

    There are three steps to add Lightning components to a Visualforce page.

    Add the <apex:includeLightning /> component to your Visualforce page.
    Reference a Lightning app that declares your component dependencies with $Lightning.use().
    Write a function that creates the component on the visualforce page with $Lightning.createComponent().

     

     

    Thanks.

  • shariq

    Member
    September 15, 2018 at 10:46 am

    Hi,

    Just follow these steps which i found online -

    There are three steps to add Lightning components to a Visualforce page.Add the Lightning Components for

    • Visualforce JavaScript library to your Visualforce page using the <apex:includeLightning/> component.
    • Create and reference a Lightning app that declares your component dependencies.
    • Write a JavaScript function that creates the component on the page using $Lightning.createComponent().

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs