@salesforce/wes-for-ec
v1.0.21
Published
Website Experience Subsystem theme created to support a new design system on Experience Cloud
Downloads
458
Maintainers
Readme
Website Experience Subsystem for Experience Cloud (WES for EC)
What is WES for EC?
This project aims to bring the Website Experience Subsystem (WES) to Experience Cloud. By installing WES for Experience Cloud on a LWR site, you will gain access to WES grids, design tokens and utilities. The theme also slightly swaps some base Out-of-the-box components styles with design tokens from the Website Experience System. The Website Experience Subsystem provides a branded Salesforce experience and is currently recommended for Salesforce experiences that sit outside the core platform like websites, experience cloud communities and landing pages.
=> Check the WES for EC Website for instructions.
Installation on an Experience Cloud LWR Site
Method 1: Static Resources
- Download the wes_for_ec.css file.
- Upload the WES for EC styles (wes_for_ec.css) as a static resource to your experience cloud site and call it wesforec.
- Inside experience builder, go to the Advanced tab and click on "Edit Head Markup"
- Import the WES for EC bundle just before the end of the
</head>
tag using<link rel="stylesheet" href="{ basePath }/sfsites/c/resource/wesforec.css" />
- Reload your site on Experience Builder and it should now display WES styles.
Installation on Open Source Projects
Method 1: Import Resources
- Download the wes_for_ec.css file.
- Import the file to your project's
<head>
section<link rel="stylesheet" href="wesforec.css" />
Method 2: NPM Package (with Experience Cloud global hooks)
- On the terminal type
npm i @salesforce/wes-for-ec
- Import the
dist/wes_for_ec.css
file to your project. **The private package will only be visible if you are a member of the Salesforce organization on NPM.
Local Installation
Install the wes-to-ec project in your local environment to modify, contribute or test.
- Clone the project
git clone [email protected]:salesforce-ux/wes-for-ec.git
- Install dependencies
npm install
- Run demo site
npm run dev
- Build the wes_for_ec.css bundle
npm build
FAQ
Can I use this bundle on non-LWR Experience Cloud sites?
This project was created and tested to support WES in LWR Experience Cloud sites. If you with to install WES in any other environment please refer directly to Website Experience Subsystem (WES).
Can I use WES components?
WES components are not currently supported on Experience Cloud due to icompatibility with the Lightning Web Component framework. However, you can use WES design tokens to build your own custom LWC components.