Run Lightning Components Apps Anywhere with Lightning Out (Beta)

Whether it’s a Node.js app running on Heroku, a department server inside the firewall, or even SharePoint, build your custom app with and run it wherever your users are.


This release contains a beta version of Lightning Out, which means it’s a high quality feature with known limitations. You can provide feedback and suggestions for Lightning Out on the IdeaExchange.

Lightning Out is the technology that powers Lightning Components for Visualforce, now available in the “full strength” version. The process for using Lightning Out outside of Visualforce is comparably simple.
  1. Setup and preparation.
  2. Create a reference to a Lightning Components app that includes dependency information about the components you intend to use.
  3. Create components on the page to build the page’s functionality.

Setup is more involved than with Lightning Components for Visualforce, because Lightning Out isn’t running inside a Salesforce container. You manually handle services that are provided automatically when running inside Salesforce. For example, your client code needs to explicitly manage authentication and session initialization, either with your own code or using a library such as ForceJS.

There’s also some setup within Salesforce to allow access to your Lightning Components app. You need to configure the remote site for CORS and create a Connected App with OAuth in Salesforce. This process is the same one that you follow for any for app that connects to Salesforce.

For more details and sample code, see the Lightning Components Developer Guide.