My employer is planning a transition to Lightning Experience in the coming months, so I have been learning to develop LWCs and practicing with real projects. I am wondering if it is possible to add those components I have developed to a Visualforce page for use in our org before we roll out Lightning to our users. If so, what is best practice?


1 Answer 1


yes, starting from Summer '19 it is possible to add LWC to VF page via lightning out. Read documentation

Adding a Lightning web component to a Visualforce page is a three-step process.

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

Use the <namespace:camelCaseComponentName> naming convention to reference a Lightning web component in a Visualforce page.

You can find some examples on google, for example this one and example from documentation

Not the answer you're looking for? Browse other questions tagged .