Choose Your Installation Method
There are three ways to install Lightning Web Components Recipes. Choose the method that best fits your needs:Scratch Org
Recommended for developersFull development environment with source control
Unlocked Package
Easiest installationOne-click install, no local tools required
Developer Edition
Permanent environmentDeploy to a persistent org for long-term use
Method 1: Scratch Org Installation
Recommended for developers who want to experience both the app and the code with full source control.
Prerequisites
Set up your environment
Follow the steps in the Quick Start: Lightning Web Components Trailhead project:
- Enable Dev Hub in your Trailhead Playground
- Install Salesforce CLI
- Install Visual Studio Code
- Install the Visual Studio Code Salesforce extensions, including the Lightning Web Components extension
Installation Steps
Authorize your Dev Hub
If you haven’t already done so, authorize your hub org and provide it with an alias:
Create a scratch org
Create a scratch org and provide it with an alias:
This creates a scratch org configured for the LWC Recipes app using the project scratch definition file.
Activate a theme
In Setup, under Themes and Branding, activate the Recipes Lite or Recipes Blue theme.
Method 2: Unlocked Package Installation
Easiest installation method - No local development tools required. Perfect for quickly experiencing the app.
Prerequisites
- A Salesforce org: Developer Edition Org (free) or Trailhead Playground
- Start from a brand-new environment to avoid conflicts
Installation Steps
Install the package
Click this link to install the Recipes unlocked package:Install LWC Recipes Package
Package ID:
04tKi000000kbj6IAA (Version 65.0.0-14)Import sample data
Import Account and Contacts data:
-
Download the CSV file: Accounts-Contacts.csv
- Right-click and save as Accounts-Contacts.csv
- In Setup, search for Data Import Wizard in the Quick Find box
- Click Launch Wizard
- Select Accounts and Contacts, then click Add New Records
- Drag the Accounts-Contacts.csv file to the upload area
- Click Next, Next, and Start Import
Assign permission set (if needed)
- Go to Setup > Users > Permission Sets
- Click recipes
- Click Manage Assignments
- Check your user and click Add Assignments
Activate a theme
In Setup, under Themes and Branding, activate the Recipes Lite or Recipes Blue theme.
Method 3: Developer Edition / Trailhead Playground
Deploy to a permanent environment using source deployment. Ideal for Trailhead badges or long-term testing.
Prerequisites
- Salesforce CLI installed
- A Developer Edition Org (free) or Trailhead Playground
- Start from a brand-new environment to avoid conflicts
Installation Steps
Activate a theme
In Setup, under Themes and Branding, activate the Recipes Lite or Recipes Blue theme.
Optional: Development Tools Setup
Code Formatting with Prettier
Prettier ensures consistent code formatting across the codebase.- Install the Prettier VSCode extension
- The
.prettierignoreand.prettierrcfiles are included in the repository
Code Linting with ESLint
ESLint identifies stylistic errors and erroneous constructs in JavaScript.- Install the Salesforce Extension Pack for VSCode
- The
.eslintignorefile is included to exclude specific files from linting
Pre-commit Hooks
Set up automatic code formatting and linting before each commit:Install Node.js
Install Node.js if you haven’t already.
Mac users: Verify that Xcode command line tools are installed before proceeding.
Code Tours
Code Tours provide guided walkthroughs through the app code. Install the CodeTour VSCode extension to access interactive code tours.Next Steps
Quick Start Guide
Learn how to explore components and start building
Component Examples
Browse the complete catalog of 123+ recipes
