Lightning Base Components
LWC Garden comes with out of the box support for SLDS and is easy to pair with the official lightning-base-components
NPM package.
Enable SLDS
There are a few short steps to get SLDS up and running.
LWC Garden Configuration
Enabling SLDS is a simple flag in your garden.config.js
file.
Install @salesforce-ux/design-system
@salesforce-ux/design-system
is where the Salesforce Lightning Design System lives off platform. This can be installed via npm.
You must also edit your lwr.config.json
file to configure the path to SLDS.
Lightning Base Components
Most on-platform components can be used locally in LWC Garden. See the official lightning-base-components
README.md for a list of available LWCs.
You can build your own mock lightning-*
components if you need, read more.
To get these components working you will need to adjust your lwr.config.json
file.
Windows support
By default, Salesforce does not offer proper Windows support due to bugs in their @lwrjs/*
packages.
We can add native windows support (no need for WSL) via @lukethacoder/lwrjs-module-registry
. This package is an opinionated edit that fixes Windows specific issues as well as a few other bugs.
Install
Configuration
In your package.json
, add the following override.
NOTE: this is for pnpm. NPM and Yarn have a similar overrides method.