Prerequisites
Before you build with the Headless Experience Layer (HXL), set up your development environment and enable HXL in your org. Complete these prerequisites to create and deploy HXL widgets.
Enable HXL in Your Org
HXL is available as a beta feature in API version 67.0 and later. To use HXL widgets in your org, enable the HXL beta feature.
- From Setup, in the Quick Find box, enter
Headless Experience Layer Settings, and then select Headless Experience Layer Settings. - Review the beta terms. To turn on the feature, select the feature toggle.
Set Up a Salesforce DX Project
HXL widgets are source-based metadata that you develop locally and deploy to your org. Set up a Salesforce DX (SFDX) project and connect it to your Salesforce org.
- Install the Salesforce CLI. Use the
sf projectcommands to deploy, retrieve, and track source files. See Install Salesforce CLI. - Create or open an SFDX project. Store your widget bundles in the
uiWidgetsfolder in your project’s package directory. - Authorize your org. Connect the CLI to your target org so that you can deploy and retrieve metadata. See Authorization.
Choose How to Build Your Widgets
You can compose and preview HXL widgets in the HXL Playground. Describe your UI as declarative JSON, preview it natively across surfaces, and copy the resulting widget definitions into your project. The playground is the fastest way to learn HXL concepts and prototype widgets.
Alternatively, vibe code your widgets in an AI-assisted development environment. Agentforce Vibes provides tooling to generate and refine widgets with AI assistance. To set up this environment, see Get Started with Agentforce Vibes.
Next Steps
After you complete these prerequisites, you’re ready to build.
- Learn key concepts in Build Rich UI Experiences with HXL Widgets.
- Experiment with widgets in the HXL Playground.
- Choose a target channel, either Agentforce or MCP-based channels, such as Claude and Slackbot.
Beta Feature