Lightning Web Components (LWC)

Build reusable UI components using this lightweight, open-source framework. LWC leverages custom elements, templates, shadow DOM, decorators, modules, and other new language constructs available in ECMAScript 7 and beyond.
Trail

Build Lightning Web Components 

7475 PointsDevelop reusable Lightning Web Components using JavaScript and HTML.
Module

Lightning Web Components for Visualforce Developers 

1300 PointsDiscover how your Visualforce knowledge applies to Lightning Web Components.
Superbadge

Lightning Web Components Specialist 

16000 PointsShowcase your mastery of Lightning Web Components by building a sophisticated app.
Project

Quick Start: Explore the Lightning Web Components OSS Recipes Sample App 

200 PointsDeploy and discover the Lightning Web Components Open Source (OSS) Recipes Sample App.
All Trailhead Modules

Trailhead

LWC Enhancements for Developers | Learn MOAR Spring ’23

Learn about the latest Lightning Web Components features to get excited about in the Spring ’23 release, like a new API and improved conditional directives.January 17, 2023

A Deep Dive into the LightningModal Base Component

With the Winter ’23 release, we now ship LightningModal, a base Lightning component that makes it simpler to incorporate modals into your components.December 27, 2022

Extend Email Templates with Lightning Web Components

Learn how to build custom Lightning Web Components (LWCs) in Email Content Builder to make the email experience more interactive.December 20, 2022

Embed Screen Flows in Your Lightning Web Components

Screen Flow lets developers and admins create user interfaces and tie them to Salesforce data, and use Lightning Web Components as flow elements.December 15, 2022

Using the New BarcodeScanner API in Mobile Lightning Web Components

Our new BarcodeScanner API enables developers to more quickly build Lightning web components (LWCs) for Salesforce mobile apps.October 03, 2022

Customize Your Apps with Styling Hooks

Styling hooks went GA with the Spring ’22 release. This feature opens the door to the customization of Lightning base components and much more.July 12, 2022

Learn MOAR in Summer ’22 with Lightning Web Components

Lightning Components continue to evolve with many great new features that will be Generally Available in the Summer ‘22 release.May 18, 2022

Build Components That Communicate with Dynamic Interactions

In this post, you'll learn how to communicate between components using dynamic interactions.March 17, 2022

Working with CORS and CSP to Call APIs from LWC

In this blog post, we’ll learn about CORS and CSP and how to fix common errors.March 16, 2022

Customizing the Lightning Datatable Component

In this post, we will cover three new datatable recipes that were recently added to the LWC Recipes sample app.March 08, 2022

Learn MOAR in Spring ’22 with LWC in Tableau CRM Dashboards

In Spring ’22, you can extend the power of Lightning Web Components (LWC) to Tableau CRM dashboards and build even richer and more customized analytics apps.February 03, 2022

Lightning Web Components for Your Inbox

Believe it or not, since the Summer ’19 release, you have been able to bring Lightning Components right into your inbox through our Gmail and Outlook integrations.September 13, 2021

Learn MOAR in Winter ’22 with LWC Cookie Consent Module

The Winter ’22 release introduces a much anticipated module for managing cookie consent right in Lighting Web Components! You can check consent against a category and set the category’s consent status each time you want to make a change.September 09, 2021

Inter-Component Communication Patterns for Lightning Web Components

In this post, I’ll share an overview of the different communication patterns along with their perks and use cases.May 31, 2021

Learn MOAR with Summer ’21: LWC Quick Actions

Take Quick Actions to the next level with Lightning Web Components.May 21, 2021

How to Build a Webview-Powered VS Code Extension with LWC

Read this blog to learn how to build a Webview-Powered VS Code Extension with LWC.April 28, 2021

Leveraging the Newest ESXX Features in LWC

Read this blog to learn about some of the newest and coolest ECMAScript features and how you can use them in Lightning Web Components.February 23, 2021

Unit Test Lightning Web Components with Jest

In this blog post you’ll learn best practices for writing your own unit tests.March 26, 2019

Introducing Lightning Web Components

Learn about the core technologies behind Lightning Web Components from this launch blog post.December 13, 2018

Get more developer news

More Blog Posts

Blog

LWC Utils with James Hou

In this episode, James shares his journey with JavaScript and LWC and how he created LWC Utils, a collection of utilities for Lightning Web Components.36 min

LWC and Web Standards with Greg Whitworth

In this episode, Greg shares about his history working with web standards and the benefits they can have for Salesforce and its developers.34 min

LWC and Apex Performance with Anil Jacob

In this episode, Anil shares some of the tips and tricks he gives to his customers with all of us. Whether you’re a “complicated customer” or not, his insights will surely be helpful for you.30 min

Building a Snake Game in LWC with Aditya Naag Topalli

In this episode we break down why and how Aditya built the game and the lessons he learned along the way about performance, controlling the DOM, and more.31 min

Lighting Web Components with Kevin Hill

In this episode, Kevin Hill discusses the development of Lightning Web Components, as well a some upcoming LWC features.20 min

Web Component Development with David Norris

In this episode, David Norris discusses how he built a complex and highly visible Lightning Web Component in the form of a timeline that renders a visualization for related data, such as events, tasks, and opportunities.26 min

Developer Podcast

Developer PodcastTune in to our Developer Podcast hosted by René Winkelmeyer, Senior Director of Salesforce Developer Relations, and featuring our developer advocates. Hear insightful stories, quick tips, and relevant updates for the Salesforce Developer community.
More Episodes

Lightning Web Components Recipes 

A collection of easy-to-digest code examples for Lightning Web Components on Salesforce Platform. Each recipe demonstrates how to code a specific task in about 30 lines of code or less. A View Source link takes you right to the code in GitHub. From Hello World to data access and third-party libraries, there is a recipe for that!

E-Bikes 

Sample retail application. This application helps E-Bikes, a fictitious electric bicycle manufacturer, manage their products and reseller orders using a rich User Experience. Explore this application, that also integrates with Salesfoce Communities, and learn how to build rich User Experiences with Lightning Web Components using different data access strategies.

Dreamhouse 

Sample real estate application. DreamHouse is a fictitious real estate company. This application helps DreamHouse brokers manage their properties and their customers. The application also helps prospective home buyers find their dream house via a custom mobile app. Regardless of the industry you work in, this app demonstrates how to build rich and immersive user experiences with Lightning Components.

Lightning Web Components Recipes OSS 

A collection of easy-to-digest code examples for Lightning Web Components Open Source. Each recipe demonstrates how to code a specific task in about 30 lines of code or less. A View Source link takes you right to the code in GitHub. From Hello World to data access and third-party libraries, there is a recipe for that!

Visualforce to Lightning Web Components 

This collection of code examples helps you move from Visualforce to Lightning Web Components. Each example shows a typical Visualforce pattern and its equivalent LWC implementation. On each example, there's a link that takes you right to the Visualforce or LWC code in GitHub. Heavy usage of base components and features, such as Lightning Data Service.
All Code Samples

Code Samples