Lightning Component Library

The Lightning Component Library includes component reference information and tools for Lightning Web Security and Lightning Locker.

You can find the Component Library in two places: a public site and an authenticated one that’s linked to your Salesforce org. In the authenticated site, the Component Reference section of the Component Library has some additional features.

Public Component Library

View this site without logging in to Salesforce. The Component Reference includes documentation and reference information for the base components.

Component Library for your org

View this site by logging in to your Salesforce org and navigating to https://<myDomainName> Alternatively, click Link to your org at the top right on the public site.

The authenticated site has more features for the Component Reference.

  • View Lightning components that are unique to your org.
  • View Lightning components that are installed in a managed package. You can filter to view components owned by your org or installed in packages.

The Developer Guide isn’t available in the authenticated site. Accessing the Developer Guide tab in the authenticated site reroutes you to the public developer guide.

The Component Reference is where you find the details about each base Lightning component. It documents the full set of base components for both the Lightning Web Components and Aura programming models.

Here are a few highlights about the Component Reference.

Filter components

On the Overview page, filter to focus on the components you’re interested in. For example, to see only those components related to navigation, select Filters | Categories | Navigation.

View targets

When you select a component, the Target panel at the top shows where you can use the component. Targets can include Salesforce App, Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Standalone Lightning App, and so on.

Switch between components

Switch between the versions of a component by clicking the View as Aura Component and View as Lightning Web Component button.

View example, documentation, and specification pages

Most components have Example, Documentation, and Specification pages. Some components, such as lightning-record-form and lightning-input-field, require Salesforce data. They can't be used outside an org and don't have an Example page.

Modify interactive examples

The Example page features interactive code samples that demonstrate how the component looks and behaves. You can view the code that’s running. For Lightning web components, you can also edit the example code in the Lightning Mini Playground and see your changes immediately in the interactive example.

Lightning Web Security Console and LWS Distortion Viewer help you develop secure JavaScript code that runs with Lightning Web Security.

For more information about using these tools, see Evaluate JavaScript in Lightning Web Security Console and Look Up Distortion Details in LWS Distortion Viewer.

For more about Lightning Web Security and how it compares to Lightning Locker, see Lightning Web Security.

The Locker Console and Locker API Viewer help you develop secure JavaScript code that is compatible and runs efficiently with Lightning Locker.

For more information about using these tools, see Lightning Locker Tools in the Lightning Aura Components Developer Guide.

For more about Lightning Locker and Lightning web components, see Security with Lightning Locker.

The component examples run in playgrounds. To experiment with an example, modify it and click Run. You can also play with the component examples at

The example playgrounds don’t use the latest versions of the components due to technical limitations that we’re trying to address. For this reason, component changes such as new attributes added in recent releases don’t work in the example playgrounds. The components are updated at

The Component Reference is a work in progress. Here are some known issues.

Non-lightning namespace differences in the public vs authenticated Component Reference

In the public site, the Component Reference for non-lightning namespaces can contain outdated content. For non-lightning components, such as wave:waveDashboard or force:createRecord, verify the specification and documentation in https://<myDomainName>

Documentation for Lightning web components developed in your org isn’t supported

The Component Reference doesn’t display documentation for your custom Lightning web components

Specification panel missing content

Modules don’t display descriptions or methods on the Specification page. The descriptions and methods are on the Documentation page. Modules include:

  • lightning/empApi
  • lightning/flowSupport
  • lightning/messageService
  • lightning/navigation

Some attributes that have default values don't display a value in the Default column. See the Description column for default values.

Custom events aren’t displayed in Specification pages. See the component’s Documentation page for this information.

Versioning and localization aren’t supported

The Component Reference displays documentation that corresponds to the current release only. It doesn’t support the Version or Language picker that are available in the Lightning Web Components Developer Guide.