# HXL widget building blocks and output rendering

*AIforce Foundations Study Guide · AIforce and Headless Toolkit · Last updated December 2, 2026 · https://www.certifyforce.com/study-guide/aiforce-foundations/aiforce-and-headless-toolkit/hxl-widget-building-blocks-and-output-rendering*

What an HXL widget is made of (composition, configuration, schema), how a custom Lightning type and its renderer connect an action's structured output to a widget, and how HXL output rendering differs from an LWC override.

- Certification: Salesforce AIforce Foundations
- Exam section: AIforce and Headless Toolkit
- Study guide: https://www.certifyforce.com/study-guide/aiforce-foundations

**Official exam objective:**

> Identify how the Headless Experience Layer (HXL) enables Salesforce experiences across supported external AI interfaces.

## What the exam expects

- Explain how HXL separates presentation (the widget) from business logic (the action that returns structured output).
- Identify the role of each widget building block: composition, widget configuration and schema.
- Describe how a custom Lightning type and its renderer connect action output to a widget, and where Output Rendering is selected.
- Recognize what a composition can do: data bindings, formulas, conditional and repeated components, static resources.
- Choose between an HXL widget renderer and an LWC override, and explain how a widget button's request is handled.
- Key terms: **widget** (a platform-independent UI composition defined once in JSON); **custom Lightning type (CLT)** (represents structured output and connects it to a renderer); **renderer.json** (the CLT file that references the widget and maps properties to attributes); **Output Rendering** (the action-output setting that applies a CLT); **subagent** (formerly topic: a job an agent handles, with its own actions and reasoning instructions).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Widget surfaces | Agentforce Employee agent in Lightning Experience; ChatGPT, Claude, Slackbot via MCP | [Build Rich UI with HXL Widgets](https://developer.salesforce.com/docs/platform/hxl/guide/hxl-rich-ui.html) |
| Composition | Components, hierarchy, ordering and data bindings | [Build Rich UI with HXL Widgets](https://developer.salesforce.com/docs/platform/hxl/guide/hxl-rich-ui.html) |
| Schema | Accepted attributes and their Lightning types; optional | [Build Rich UI with HXL Widgets](https://developer.salesforce.com/docs/platform/hxl/guide/hxl-rich-ui.html) |
| Mapping | CLT renderer.json maps CLT properties to widget schema attributes | [Build Rich UI with HXL Widgets](https://developer.salesforce.com/docs/platform/hxl/guide/hxl-rich-ui.html) |
| Output Rendering | Selecting the CLT on the action output applies its renderer | [HXL as Agentforce Action Output](https://developer.salesforce.com/docs/platform/hxl/guide/agentforce-action-output.html) |
| Action types | Flow, Apex, Prompt Template and others return structured output | [HXL as Agentforce Action Output](https://developer.salesforce.com/docs/platform/hxl/guide/agentforce-action-output.html) |
| Formulas | Computed values and conditionals inside the composition | [Composition File](https://developer.salesforce.com/docs/platform/hxl/guide/hxl-widget-composition.html) |
| Static resources | Must be reachable without authentication | [Composition File](https://developer.salesforce.com/docs/platform/hxl/guide/hxl-widget-composition.html) |
| Widget role in CLTs | Output only; not in editor.json | [Lightning Type UI Configuration](https://developer.salesforce.com/docs/platform/lightning-types/guide/lightning-types-ui-config.html) |

## Check yourself

- Why must every Image component in a widget include alternative text?
- Which component organizes content into vertically stacked sections that expand?
- When `meta.forEach` is used without `forItem`, which variable refers to the current item?

## Sources

- [Build Rich UI Experiences with HXL Widgets](https://developer.salesforce.com/docs/platform/hxl/guide/hxl-rich-ui.html)
- [Use HXL Widgets as Agentforce Action Output](https://developer.salesforce.com/docs/platform/hxl/guide/agentforce-action-output.html)
- [Composition File](https://developer.salesforce.com/docs/platform/hxl/guide/hxl-widget-composition.html)
- [HXL Components](https://developer.salesforce.com/docs/platform/hxl/references/hxl-reference-about/about-hxl-components.html)
- [Lightning Type UI Configuration](https://developer.salesforce.com/docs/platform/lightning-types/guide/lightning-types-ui-config.html)
- [Get Started with Headless Experience Layer](https://developer.salesforce.com/docs/platform/hxl/guide/get-started.html)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit and reading progress are included in the full study guide. The separate practice exams option includes the reviewed question bank and timed mock exams. The bundle includes both where available. See [current options and prices](https://www.certifyforce.com/pricing).
