@lightning-out/lwc-shell
v2.2.0-rc.0
Published
A standard Web Component shell for UI Embedding
Downloads
321
Keywords
Readme
@lightning-out/lwc-shell
A custom web component (<lwc-shell>) that renders a sandboxed <iframe> to embed Micro-Frontend (MFE) applications inside Salesforce Lightning pages, Experience sites, and other LWC-enabled surfaces.
Key Capabilities
- Sandboxed
<iframe>rendering inside a closed Shadow DOM - Cross-origin communication with embedded MFE apps via
postMessagebridge - Configurable sandbox tokens, fullscreen mode, automatic resize, and theme forwarding
- Dirty-state tracking with unsaved-changes confirmation modal
- Framework-agnostic — extends
HTMLElementdirectly
Documentation
| Document | Description |
|---|---|
| LWC_SHELL_WEB_COMPONENT_API.md | Full specification of the <lwc-shell> web component — attributes, properties, methods, events, and sandbox security. |
| LWC_SHELL_WRAPPER_GUIDE.md | Step-by-step guide to writing an LWC wrapper, from setup and vendor build through to deployment, with a complete code recipe. |
Package Contents
| Path | Purpose |
|---|---|
| src/InternalHostLwcShell.ts | Core web component implementation (<lwc-shell> custom element). |
| src/utils/ | Shared utilities — symbol keys, dirty-state contract, GUID generator. |
| src/lwc/ | Source LWC components (e.g. dirtyStateModal) that are vendored into consumer projects. |
| scripts/vendor-build.js | CLI tool (lwc-shell-vendor-build) that copies built artifacts as vendor-prefixed LWC components. |
